Compare commits

...

1 commit

Author SHA1 Message Date
6b95ad4938 add docstring to SQLAlchemy(), version advance 2025-09-04 09:36:35 +02:00
3 changed files with 21 additions and 3 deletions

View file

@ -1,5 +1,14 @@
# Changelog # Changelog
## 0.6.0
👀
## 0.5.3
- Added docstring to `SQLAlchemy()`.
- More type fixes.
## 0.5.2 ## 0.5.2
- Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable - Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable

View file

@ -34,7 +34,7 @@ from .validators import matches
from .redact import redact_url_password from .redact import redact_url_password
from .http import WantsContentType from .http import WantsContentType
__version__ = "0.5.3-dev34" __version__ = "0.5.3"
__all__ = ( __all__ = (
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue', 'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',

View file

@ -29,8 +29,17 @@ from suou.exceptions import NotFoundError
class SQLAlchemy: class SQLAlchemy:
""" """
Drop-in (?) replacement for flask_sqlalchemy.SQLAlchemy() Drop-in (in fact, almost) replacement for flask_sqlalchemy.SQLAlchemy()
eligible for async environments eligible for async environments.
Notable changes:
+ You have to create the session yourself. Easiest use case:
async def handler (userid):
async with db as session:
# do something
user = (await session.execute(select(User).where(User.id == userid))).scalar()
# ...
NEW 0.5.0 NEW 0.5.0
""" """