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 5 of 23

0.16.17

-------
- Add `on_delete` in `ManyToManyField`. (508)
- Support `F` expression in `annotate`. (475)
- Fix `QuerySet.select_related` in case of join same table twice. (525)
- Integrate Aerich into the install. (530)

0.16.16

-------
- Fixed inconsistency in integrity error exception of FastAPI
- add OSError to _get_comments except block

0.16.15

-------
- Make `DateField` accept valid date str.
- Add `QuerySet.select_for_update()`.
- check ``default`` for not ``None`` on pydantic model creation
- propagate default to pydantic model
- Add `QuerySet.select_related()`.
- Add custom attribute name for Prefetch instruction.
- Add `db_constraint` for `RelationalField` family.

0.16.14

-------
- Make ``F`` expression work with ``QuerySet.filter()``.
- Include ``py.typed`` in source distribution.
- Added ``datetime`` parsing from ``int`` for ``fields.DatetimeField``.
- ``get_or_create`` passes the ``using_db=`` on if provided.
- Allow custom ``loop`` and ``connection_class`` parameters to be passed on to asyncpg.

0.16.13

-------
- Default install of ``tortoise-orm`` now installs with no C-dependencies, if you want to use the C accelerators, please do a ``pip install tortoise-orm[accel]`` instead.
- Added ``<instance>.clone()`` method that will create a cloned instance in memory. To persist it you still need to call ``.save()``
- ``.clone()`` will raise a ``ParamsError`` if tortoise can't generate a primary key. In that case do a ``.clone(pk=<newval>)``
- If manually setting the primary key value to ``None`` and the primary key can be automatically generated, this will create a new record. We however still recommend the ``.clone()`` method instead.
- ``.save()`` can be forced to do a create by setting ``force_create=True``
- ``.save()`` can be forced to do an update by setting ``force_update=True``
- Setting ``update_fields`` for a ``.save()`` operation will strongly prefer to do an update if possible

0.16.12

-------
- Make ``Field.default`` effect on db level when generate table
- Add converters instead of importing from pymysql
- Fix postgres BooleanField default value convent
- Fix ``JSONField`` typed in ``pydantic_model_creator``
- Add ``.sql()`` method on ``QuerySet``

Page 5 of 23

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.