Toothpick

Latest version: v1.8.3

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

Scan your dependencies

Page 2 of 4

1.5.4

========================
* added: `exceptions.ConnectionError` is now raised by resources that can't
connect to their data source.
* fixed: certain `MultipleAssociation` instances were not properly evicting.
* added: when an association produces `exceptions.NotFound`,
`exceptions.ForeignKeyError` is raised.

1.5.2

=======================
* added: `validate` and `exception` options to `Basesave()`. These options
respectively allow the caller to skip validation, or return a boolean rather
than raise an exception (success = `True`).

1.5.1

=======================
* fixed: attribute assignment on embedded models that have a schema was broken.
* fixed: associations that used a property or transient as the data field were
not being loaded properly.

1.5.0

======================
* added: Toothpick now supports modeling embedded objects. Embedded models
subclass `toothpick.EmbeddedBase`, and define resources using
`toothpick.EmbeddedResource`. Embedded models should be declared as
associations in their parent objects, using `toothpick.embeds_a` or
`toothpick.embeds_many`. Embedded models support most of the functionality
that Toothpick provides for normal models, like validations, attribute
access, etc (everything but find- and persistence-related functionality,
pretty much), but they use some node in the parent object's document
structure as their backing document.
* added: Toothpick models are now serializable via the 'pickle' module.
* added: `validate_associated` validation ensures that associated models do
not have errors.
* added: Options can now be passed to Resources. Currently, only options
controlling cache behavior have been implemented.
* added: Improved cache key calculation (keys could be improperly created in
some cases), and added support for 'cache_ttl' and 'uncached' Resource
options.
* removed: Deprecated function `Baseadd_error` has been removed.
* removed: `data_queryify` option in association creation has been removed.

1.4.5

======================
* added: MongoResource queries can take a 'fields' option, which is passed
into pymongo's `find` call as the `fields` keyword argument. This allows for
documents to be fetched that have some subset of the documents keys present.

1.4.4

======================
* changed: Removed clean/dirty tracking on the model. During a call to
Basesave(), every document stored on the model is persisted to the
appropriate backend.
* added: Errorsapi_messages() function that renders error messages like
Errorsmessages(), but doesn't humanize the field names.
* fixed: corrected the behavior of items() on instances generated via Factory.

Page 2 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.