Spaces:
Sleeping
Sleeping
Download mem0/embedchain/examples/rest-api/database.py from alrojas68/Embedchain: direct link, hf CLI and curl.
- Browser
- Download file 388 Bytes
-
https://huggingface.co/spaces/alrojas68/Embedchain/resolve/main/mem0/embedchain/examples/rest-api/database.py
- Command line
-
hf download hf://spaces/alrojas68/Embedchain/mem0/embedchain/examples/rest-api/database.py
-
curl -L -o database.py https://huggingface.co/spaces/alrojas68/Embedchain/resolve/main/mem0/embedchain/examples/rest-api/database.py
388 Bytes
| from sqlalchemy import create_engine | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.orm import sessionmaker | |
| SQLALCHEMY_DATABASE_URI = "sqlite:///./app.db" | |
| engine = create_engine(SQLALCHEMY_DATABASE_URI, connect_args={"check_same_thread": False}) | |
| SessionLocal = sessionmaker(autocommit=False, autoflush=False, bind=engine) | |
| Base = declarative_base() | |