Toothpick

Latest version: v1.8.3

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

Scan your dependencies

Page 4 of 4

1.2.2

===========================
* fixed: using Base.find() with a single_query that evaluates to false now
properly runs the query instead of dropping it on the floor.
* removed: unweildy dictionary-based syntax for setting the resource that a
foreign key should be set on for an association. See `data_resource` option
below.
* added: Associations can take a `data_resource` option to specify what
resource a foreign key should be set on when assigning an association.
* added: Associations can take a `data_queryify` option to transform a foreign
key before it's used to find an associated resource. This is intended to
make trivial transforms of keys (e.g. int to string) more straightforward in
an association.

1.2.1

===========================
* added: cache logging via cache.log_actions. Set this to an array containing
any of "get", "set", "delete" and the cache will print a log message when a
corresponding action is performed.
* fixed: "eviction" hooks were not registered, fixed.

1.2.0

===========================
* added: support for options on MongoAdapter - keyword options will be chained
to the cursor returned by the initial `Base.find()` call, using the key as
the method name, and the value as the argument.
* fix: Overhauled `Baseevict()`. `Base` now has a class method
`Base.evict_document()` that actually performs the work of removing a
document from the cache backend. The instance method `Baseevict()` has been
modified to perform eviction using every resource for which a query can be
generated (via `Resourcegenerate_query()`). Documents that may have been
stored by association are also removed from the cache. Noteably, in a
parent-children relationship using an aggregate association, calling
`child.evict()` will not clear parent.children from the cache, because all of
the children are stored in the cache as a single document when an aggregate
association is used, and the child does not have a handle to that document.
* added: "eviction" hooks - before_eviction, et al.

1.1.0

==========================
* added: 'aggregate' associations for fetching multiple associated models at the
same time
* added: schema as read-only property to `Base`.
* added: support for transient fields on toothpick models.
* added: support for passing an options dictionary into a resource Adapter.
instantiation through Base.find(), using a configurable keyword argument
* changed: Basesave() raises an exception if validation fails
* known-issue: validators and hooks registered using the `validator` or
`hook_provider` decorators on methods declared in mixins aren't registered
properly.

1.0.0

=========================
* added: Changes file. Please review the git log for changes prior to this
release.

Page 4 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.