init
This commit is contained in:
10
database/mongodb.py
Normal file
10
database/mongodb.py
Normal file
@@ -0,0 +1,10 @@
|
||||
from pymongo import MongoClient
|
||||
|
||||
client = MongoClient("mongodb://localhost:27017")
|
||||
|
||||
def get_database():
|
||||
return client["neonsr"]
|
||||
|
||||
def get_collection(collection_name: str):
|
||||
database = client["neonsr"]
|
||||
return database[collection_name]
|
||||
Reference in New Issue
Block a user