Tortoise-orm

Latest version: v0.20.1

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

Scan your dependencies

Page 21 of 23

0.10.2

Not secure
------
- Set single_connection to True by default, as there is known issues with connection pooling
- Updated documentation

0.10.1

Not secure
------
- Fixed M2M manager methods to correctly work with transactions
- Fixed mutating of queryset on select queries

0.10

====

0.10.0

Not secure
------
* Refactored ``Tortoise.init()`` to init all connections and discover models from config passed
as argument.

.. caution::
This is a breaking change.

You no longer need to import the models module for discovery,
instead you need to provide an app ⇒ modules map with the init call:

.. code-block:: python3

async def init():
Here we create a SQLite DB using file "db.sqlite3"
also specify the app name of "models"
which contain models from "app.models"
await Tortoise.init(
db_url='sqlite://db.sqlite3',
modules={'models': ['app.models']}
)
Generate the schema
await Tortoise.generate_schemas()

For more info, please have a look at :ref:`init_app`

- New ``transactions`` module for implicit working with transactions
- Test frameworks overhauled:
- Better performance for test runner, using transactions to keep tests isolated.
- Now depends on an ``initializer()`` and ``finalizer()`` to set up and tear down DB state.
- Exceptions have been further clarified
- Support for CPython 3.7
- Added support for MySQL/MariaDB


.. rst-class:: emphasize-children

0.9.4

Not secure
-----
- No more asserts, only Tortoise Exceptions
- Fixed PyLint plugin to work with pylint>=2.0.0
- Formalised unittest classes & documented them.
- ``__slots__`` where it was easy to do. (Changes class instances from dicts into tuples, memory savings)

0.9.3

-----
- Fixed backward incompatibility for Python 3.7

Page 21 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.