Spaces:
Runtime error
Runtime error
Download database.py from jonathanjordan21/api-recruitment-demo: direct link, hf CLI and curl.
- Browser
- Download file 392 Bytes
-
https://huggingface.co/spaces/jonathanjordan21/api-recruitment-demo/resolve/main/database.py
- Command line
-
hf download hf://spaces/jonathanjordan21/api-recruitment-demo/database.py
-
curl -L -o database.py https://huggingface.co/spaces/jonathanjordan21/api-recruitment-demo/resolve/main/database.py
392 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, declarative_base | |
| # Use SQLite for simplicity (you can switch to PostgreSQL/MySQL later) | |
| DATABASE_URL = "sqlite:///./app.db" | |
| engine = create_engine( | |
| DATABASE_URL, connect_args={"check_same_thread": False} | |
| ) | |
| SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | |
| Base = declarative_base() | |