Spaces:
Runtime error
Runtime error
Download database.py from AhmedKing241/Backend: direct link, hf CLI and curl.
- Browser
- Download file 428 Bytes
-
https://huggingface.co/spaces/AhmedKing241/Backend/resolve/main/database.py
- Command line
-
hf download hf://spaces/AhmedKing241/Backend/database.py
-
curl -L -o database.py https://huggingface.co/spaces/AhmedKing241/Backend/resolve/main/database.py
428 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.orm import sessionmaker, declarative_base | |
| DATABASE_URL = "cockroachdb+psycopg2://ahmed:H7728LlFSLGg2nzHXUiuiw@warped-bighorn-15775.j77.aws-ap-south-1.cockroachlabs.cloud:26257/defaultdb?sslmode=verify-full&sslrootcert=/code/root.crt" | |
| engine = create_engine(DATABASE_URL) | |
| SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | |
| Base = declarative_base() | |