Toothpick

Latest version: v1.8.3

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

Scan your dependencies

Page 3 of 4

1.4.3

===========================
* added: `validate_format` validator implementation
* changed: pymongo dependency has been upgraded to 2.4 (MongoClient instead of
Connection is used), and MongoResource now makes use of connection pooling
instead of establishing a connection for every request
* fixed: default_message() now has a property decorator on all
validators so that default messages aren't rendered as <bound method...>

1.4.2

===========================
* changed: RecordInvalid exception was renamed to RecordInvalidError

1.4.1

===========================
* changed: Base_errors has been renamed to Baseerrors. Base_errors is
still present, but deprecated, and delegates to the new Errors system.
* deprecated: Baseadd_error is now deprecated. Use the add() method of the
new Errors object.
* changed: The return values of validator functions is no longer considered
when deciding if an object is valid or not. Validity is governed solely by
the population (or non-population) of Baseerrors.
* added: Basic validator functions in toothpick.validations. Currently, the
g only way to make use of them is to call them from within another function
that's decorated with validator.

1.4.0

===========================
* added: Base.find_one() method, which returns exactly one instance of the
model. If the query passed produces no record, or more than one, an
exception is raised.
* changed: Base.find() now returns a list, which may be empty or may only
contain one element. Base.find() will not throw an exception unless there
is an issue communicating with the resource or instantiating the object.
* changed: Improved the way Factory objects handle associations.
* changed: Factory now expects to be working with toothpick Base subclasses.
* changed: If an object is invalid, save now raises RecordInvalid.
* changed: Model subclasses inherit special behavior (validations, hooks) in a
predictable way.
* added: Factories can now be defined with automatically-iterating sequences.
* added: Validations and hooks can now be declared in subclasses or mixins.
* added: FileResource and JSONFileResource for data on file systems.

1.3.1

===========================
* added: added a default implementation of __hash__ to Base. It computes an
objects hash as the hash of its equality_key plus its type.

1.3.0

===========================
* changed: Massive refactor in the way classes interact with data sources.
Adapters are now Resources, and no longer need to be subclassed for
configuration. Instead, they take a configuration object which can be
reused.
* changed: MongoResource no longer raises NotFound for resource not found.
* changed: MongoResource no longer establishes a connection at construction
time. Connections are established on demand.
* changed: Resourcecreate(), read(), etc methods now take a query as part of
their interface, rather than having the query passed in the constructor.

Page 3 of 4

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.