Releases: fedora-infra/sqlalchemy-helpers
v2.0.1
v2.0.0
This is a major version. The main backwards-incompatible change is that you now
need to import Base
instead of calling get_base()
as the base class for your
models.
If you are using the synchronous version:
-from sqlalchemy_helpers import get_base
+from sqlalchemy_helpers import Base
If you are using the asynchronous version:
-from sqlalchemy_helpers import Base
+from sqlalchemy_helpers.aio import Base
Or if you are using the asynchronous version and were manually mixing in the AsyncAttrs
class:
from sqlalchemy.ext.asyncio import AsyncAttrs
-from sqlalchemy_helpers import get_base
+from sqlalchemy_helpers.aio import Base
-Base = get_base(cls=AsyncAttrs)
This version also requires SQLAlchemy >= 2.0, and Pydantic >= 2.0 if you are using the FastAPI integration.
Features
- Deprecate
get_base()
to useDeclarativeBase
directly. Also add anAsyncAttrs
-enabled base class to theaio
module. (9d5f479) - Type-hint the codebase and use the new SQLAlchemy constructs (94febb3)
- Add a
fastapi
extra (4c393c2)
Dependency Changes
v1.0.2
Released on 2025-05-28. This is a bugfix release.
Dependency Changes
- Drop support for Python 3.8, it's EOL
- Fix SQLAlchemy dependency, we need at least 1.4.0
- Use the "asyncio" extra of SQLAlchemy
v1.0.1
v1.0.0
Released on 2024-05-30. This is a feature release, which will stay backwards-compatible during the 1.x.y version line (following the semantic versioning rules).
Features
- Add an
update_or_create()
function similar to Django's (#422) - Allow
aio.manager_from_config()
to pass arguments to theAsyncDatabaseManager
- Allow a few methods to use an existing session (993e6a5).
- Officially support Python 3.12 (7b88ef7).
- The
engine_args
andbase_model
arguments must now be keywords (abaccdc).
Version 0.13.0
Released on 2023-11-16. This is a feature release.
Features
- Allow customization of the model base class (bc26cd3).
Version 0.12.1
Released on 2023-10-12. This is a minor release that adds docs and development improvements
Development Improvements
- Automatically publish to PyPI and release (c572657).