database.py 200 Bytes
import pymongo

def get_connection(collection:str):
    
    client = pymongo.MongoClient('mongodb://easybistro:xejP3257@localhost:27017/Easybistro')
    
    return client['easybistro'][collection]