Advanced-alchemy

Latest version: v0.30.1

Safety actively analyzes 698693 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 3

0.30.1

:date: 2025-01-20

.. change:: Using init db CLI command creates migrations directory in unexpected place
:type: bugfix
:pr: 354
:issue: 351

When initializing migrations with the CLI, if no directory is specified, the directory from the configuration will be used.

0.30.0

:date: 2025-01-19

.. change:: standardize on `autocommit_include_redirect`
:type: bugfix
:pr: 349

The flask plugin incorrectly used the term `autocommit_with_redirect` instead of the existing `autocommit_include_redirect`.

This changes makes the name consistent before we bump to a `1.x` release

.. change:: implement default schema serializer
:type: bugfix
:pr: 350

This corrects an issue that caused the Flask extension to use the incorrect serializer for encoding JSON

.. change:: refactored integration with CLI support
:type: feature
:pr: 352

Refactored the Starlette and FastAPI integration to support multiple configurations and sessions. Additionally, FastAPI will now have the database commands automatically registered with the FastAPI CLI.

.. change:: reorganize Sanic extension
:type: feature
:pr: 353

The Sanic integration now aligns with the structure and idioms used in the other integrations.

0.29.1

:date: 2025-01-17

.. change:: add convenience hooks for `to_model` operations
:type: feature
:pr: 347

The service layer has always has a `to_model` function that accepts data and optionally an operation name. It would return a SQLAlchemy model no matter the input you gave it.

It is possible to move business logic into this `to_model` layer for populating fields on insert. (i.e. slug fields or tags, etc.).

When having logic for `insert`, `update`, `delete`, and `upsert`, that function can be a bit overwhelcoming. Now, there are helper functions that you can use that is specific to each DML hook:

* `to_model_on_create`
* `to_model_on_update`
* `to_model_on_delete`
* `to_model_on_upsert`

0.29.0

:date: 2025-01-17

.. change:: fully qualify all `datetime` module references
:type: bugfix
:pr: 341

All date time references are now full qualified to prevent any forward resolution issues with

`from datetime import datetime`

and

`import datetime`

.. change:: disabled `timezone` in alembic.ini
:type: bugfix
:pr: 344

Disabled `timezone` in alembic.ini to fix `alembic.util.exc.CommandError: Can't locate timezone: UTC` error while applying migrations

Reference:
https://alembic.sqlalchemy.org/en/latest/tutorial.html#editing-the-ini-file

.. change:: various typing improvements for services
:type: feature
:pr: 342
:issue: 261

Improved typing in the service layer and adds a additional type guards.

.. change:: Auto extend Flask CLI and add session integration
:type: feature
:pr: 111

The Advanced Alchemy alembic CLI is now auto-extended to your Flask application.

The Flask extension now also has a session handling middleware for handling auto-commits.

Last, but not least, there's an experimental async portal that integrates a long running asyncio loop for running async operations in Flask. Using `foo = portal.call(<async function>)` you can get the result of an asynchronous function from a sync context.

0.28.0

:date: 2025-01-13

.. change:: add `bind-key` option to CLI
:type: feature
:pr: 339

Adds a `bind-key` option to the Advance Alchemy CLI groups.

When present, the Alembic configs will be injected with the corresponding key.

0.27.1

:date: 2025-01-11

.. change:: correction for `3.8` and `3.9` type hints
:type: bugfix
:pr: 330

Makes a few corrections to type hints in examples and tests to ensure 3.8 and 3.9 support

Page 1 of 3

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.