Party/party/game.py
2023-10-28 16:37:50 +02:00

14 lines
410 B
Python

from pymongo import MongoClient
class game:
status = None
CONNECTION_STRING = None
client = None
collection = None
initialized = False
@classmethod
def init(self, flaschenAnzahl: tuple[int, int] = None):
self.CONNECTION_STRING = "mongodb://localhost:27017/"
self.client = MongoClient(self.CONNECTION_STRING)['partyyy']
self.collection = self.client['game']