Spaces:
Sleeping
Sleeping
Download app/database.py from CyberCRM/bad-website-lead-parser: direct link, hf CLI and curl.
- Browser
- Download file 361 Bytes
-
https://huggingface.co/spaces/CyberCRM/bad-website-lead-parser/resolve/main/app/database.py
- Command line
-
hf download hf://spaces/CyberCRM/bad-website-lead-parser/app/database.py
-
curl -L -o database.py https://huggingface.co/spaces/CyberCRM/bad-website-lead-parser/resolve/main/app/database.py
361 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import DeclarativeBase, sessionmaker | |
| from app.config import settings | |
| class Base(DeclarativeBase): | |
| pass | |
| engine = create_engine(settings.database_url, future=True, connect_args={"check_same_thread": False}) | |
| SessionLocal = sessionmaker(bind=engine, autoflush=False, autocommit=False, future=True) | |