Spaces:
Sleeping
Sleeping
Download quantlib_pro/data/models/base.py from gdukens/QuantLib_Pro: direct link, hf CLI and curl.
- Browser
- Download file 515 Bytes
-
https://huggingface.co/spaces/gdukens/QuantLib_Pro/resolve/main/quantlib_pro/data/models/base.py
- Command line
-
hf download hf://spaces/gdukens/QuantLib_Pro/quantlib_pro/data/models/base.py
-
curl -L -o base.py https://huggingface.co/spaces/gdukens/QuantLib_Pro/resolve/main/quantlib_pro/data/models/base.py
515 Bytes
| """Base SQLAlchemy declarative base.""" | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy import MetaData | |
| # Naming convention for constraints | |
| convention = { | |
| "ix": "ix_%(column_0_label)s", | |
| "uq": "uq_%(table_name)s_%(column_0_name)s", | |
| "ck": "ck_%(table_name)s_%(constraint_name)s", | |
| "fk": "fk_%(table_name)s_%(column_0_name)s_%(referred_table_name)s", | |
| "pk": "pk_%(table_name)s" | |
| } | |
| metadata = MetaData(naming_convention=convention) | |
| Base = declarative_base(metadata=metadata) | |