add docstring to SQLAlchemy(), version advance
This commit is contained in:
parent
c860d9ffe1
commit
613f4e1c89
3 changed files with 21 additions and 3 deletions
|
|
@ -1,5 +1,14 @@
|
|||
# Changelog
|
||||
|
||||
## 0.6.0
|
||||
|
||||
👀
|
||||
|
||||
## 0.5.3
|
||||
|
||||
- Added docstring to `SQLAlchemy()`.
|
||||
- More type fixes.
|
||||
|
||||
## 0.5.2
|
||||
|
||||
- Fixed poorly handled merge conflict leaving `.sqlalchemy` modulem unusable
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ from .validators import matches
|
|||
from .redact import redact_url_password
|
||||
from .http import WantsContentType
|
||||
|
||||
__version__ = "0.5.3-dev34"
|
||||
__version__ = "0.5.3"
|
||||
|
||||
__all__ = (
|
||||
'ConfigOptions', 'ConfigParserConfigSource', 'ConfigSource', 'ConfigValue',
|
||||
|
|
|
|||
|
|
@ -29,8 +29,17 @@ from suou.exceptions import NotFoundError
|
|||
|
||||
class SQLAlchemy:
|
||||
"""
|
||||
Drop-in (?) replacement for flask_sqlalchemy.SQLAlchemy()
|
||||
eligible for async environments
|
||||
Drop-in (in fact, almost) replacement for flask_sqlalchemy.SQLAlchemy()
|
||||
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
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue