Buckets:
AnonymousSpottedToad/candidate_bucket / codebase /python /hu55ain3laa_fastauth /fastauth /utils /session.py
| from typing import Generator | |
| from sqlmodel import Session | |
| def get_session(engine) -> Generator[Session, None, None]: | |
| """Get a database session from a SQLModel engine. | |
| Args: | |
| engine: SQLModel engine | |
| Yields: | |
| Session: A SQLModel session | |
| """ | |
| session = Session(engine) | |
| try: | |
| yield session | |
| finally: | |
| session.close() | |
Xet Storage Details
- Size:
- 383 Bytes
- Xet hash:
- 455838fab63a073d49671ddde90146cdaa257803564d0737ac46fd21d26fe9c4
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.