Spaces:
Paused
Paused
Download scripts/provision_db.py from tareek/honcho-api: direct link, hf CLI and curl.
- Browser
- Download file 483 Bytes
-
https://huggingface.co/spaces/tareek/honcho-api/resolve/main/scripts/provision_db.py
- Command line
-
hf download hf://spaces/tareek/honcho-api/scripts/provision_db.py
-
curl -L -o provision_db.py https://huggingface.co/spaces/tareek/honcho-api/resolve/main/scripts/provision_db.py
483 Bytes
| # honcho/scripts/provision_db.py | |
| import asyncio | |
| import os | |
| import sys | |
| # Add the project root to the path | |
| # This assumes the script is run from the scripts directory | |
| project_root = os.path.abspath(os.path.join(os.path.dirname(__file__), "..")) | |
| sys.path.insert(0, project_root) | |
| from src.db import init_db # noqa: E402 | |
| if __name__ == "__main__": | |
| print("Initializing database using Alembic migrations...") | |
| asyncio.run(init_db()) | |
| print("Database initialized successfully") | |