-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmongoClient.py
More file actions
33 lines (22 loc) · 1.06 KB
/
mongoClient.py
File metadata and controls
33 lines (22 loc) · 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import pymongo
from pymongo import MongoClient
client = MongoClient('localhost', 27017)
db = client.item_database
# api should be made of ACCESSORS & MUTATORS
# can also hold final var conversion helpers for sake of formatting
# web automation is a subroutine of backend database used for initial retrieval & updating
# python is a SCRIPTING langauge, which means all files must be ACTIONS
# possibly employ cmd parsing for method selection
#ACCESSORS
#Get group of listings.. filter by several options
#MUTATORS
#all internal, perform scheduled updates of items in list to have discount/bump info
#need a way of updating by accessing an item's nested listing page
#need a way of automatically comparing new batch of listings to old batch,
# and flag discrepancies as sold/removed
#automation & parsing stuff (selenium && beautifulsoup) go in here
#subroutines for updating the database
# list for backend
# TODO impl. database update routine
# TODO impl. re-use for chew_grailed routine to get newly uploaded items & disregard duplicates
# TODO impl. ACCESSOR commands