mirror of
https://github.com/lucaspalomodevelop/Party.git
synced 2026-03-13 00:07:21 +00:00
14 lines
410 B
Python
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'] |