Download common.py from Fuzure/sheami: direct link, hf CLI and curl.
- Browser
- Download file 300 Bytes
-
https://huggingface.co/spaces/Fuzure/sheami/resolve/main/common.py
- Command line
-
hf download hf://spaces/Fuzure/sheami/common.py
-
curl -L -o common.py https://huggingface.co/spaces/Fuzure/sheami/resolve/main/common.py
300 Bytes
| import os | |
| from dotenv import load_dotenv | |
| def get_db(): | |
| load_dotenv(override=True) | |
| DB_URI = os.getenv("MONGODB_URI") | |
| DB_NAME = os.getenv("MONGODB_DB", "sheami") | |
| from modules.db import SheamiDB # imported here so this file stays portable | |
| return SheamiDB(DB_URI, db_name=DB_NAME) | |