Update index

This commit is contained in:
Nemika
2021-03-08 20:05:07 +02:00
parent b2c29c22e1
commit c19cceb7cb
15 changed files with 1850 additions and 0 deletions

12
core/database.py Normal file
View File

@@ -0,0 +1,12 @@
from pymongo import MongoClient
from PyJS import JSON
from PyJS.modules import fs
col = MongoClient(JSON.parse(fs.createReadStream('settings.json'))['mongo'])['BytesBump']['servers']
class Servers:
def get_all(**checks):
return [server for server in col.find(checks)]
def get_one(**checks):
return col.find_one(checks)