Ommi

Latest version: v0.1.9

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

Scan your dependencies

Page 1 of 2

0.1.9

- Support for the `AssociateUsing` query field strategy was added. It allows `LazyLoadTheRelated` and `LazyLoadEveryRelated` to use an association model to find the related models to query.
- Fixed a bug using MongoDB in which the local and foreign fields of joined models would be flipped in queries, breaking the lookup and match.

0.1.8

Ommi v0.1.8 adds support for composite keys and complex queries involving an arbitrary number of models.

Complex queries work automagically so long as models define `ReferenceTo` annotations. Ommi handles generating the necessary sub-queries/joins for SQLite/PostgreSQL and aggregations for MongoDB. The following `find` sub-methods support complex queries:
- `count`
- `delete`
- `fetch`
- `set`

Composite keys are similarly handled automagically, so long as models define `Key` annotations. Ommi generates the appropriate queries to perform joins and aggregations using the declared composite keys.

0.1.7

It is now possible to have a find filter that uses two fields from two models in the query. The first model listed in the query will be the one returned.

0.1.6

Added support for declarative relationships between models using type annotations on the model classes. It uses two generic classes that take a type parameter that is the model that should be linked to the relationship.

- `LazyLoadEveryRelated` loads all related models into a list
- `LazyLoadTheRelated` loads a single related model

See the ReadMe for detailed explanations of the API.

0.1.5

This release reimplements the entire driver API to make it cleaner and easier to use. The SQLite, PostgreSQL, and MongoDB drivers have all be updated to use the new API.

0.1.4

v0.1.4 changes the behavior of the driver's `delete` and `update` methods. They now both take an arbitrary number of predicates to use as a query. The `update` method now also takes any number of keyword arguments that are then used to set fields on any matching models in the database.

Page 1 of 2

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.