Ommi

Latest version: v0.1.8

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

Scan your dependencies

Page 1 of 2

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.

0.1.3

Added MVP drivers for MongoDB and PostgreSQL using Motor and Psycopg. Both drivers are entirely asyncio based. All drivers (including for SQLite) only support queries on a single table/document, no relationships or complex queries are currently possible.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.