10 lines
178 B
Python
10 lines
178 B
Python
![]() |
from pymongo import MongoClient
|
||
|
|
||
|
|
||
|
def get_mongo_collection(col_name, db_name, uri):
|
||
|
client = MongoClient(uri)
|
||
|
db = client[db_name]
|
||
|
col = db[col_name]
|
||
|
|
||
|
return col
|