Skip to main content

made-with-python PyPI Latest Release License Documentation Status

Why ashford?

This package provides classes and decorators for a variety of Python implementations of registration, factories, and type validators.

Registries

  • registered: a decorator that stores a registry in a registry attribute of the function or class which is wrapped by the decorator.
  • Registrar: a mixin for automatic subclass registration.

Factories

* `InstanceFactory`: mixin that stores all subclass instances in the `instances` class attribute and returns stored instances when the `create` classmethod is called. * `LibraryFactory`: mixin that stores all subclasses and subclass instances in the `library` class attribute and returns stored subclasses and/or instances when the `create` classmethod is called. * `SourceFactory`: mixin that calls the appropriate creation method based on the type of passed first argument to `create` and the types stored in the keys of the `sources` class attribute. * `StealthFactory`: mixin that returns stored subclasses when the `create` classmethod is called without having a `subclasses` class attribute like SubclassFactory. * `SubclassFactory`: mixin that stores all subclasses in the `subclasses` class attribute and returns stored subclasses when the `create` classmethod is called. * `TypeFactory`: mixin that calls the appropriate creation method based on the type of passed first argument to `create` and the snakecase name of the type. This factory is prone to significant key errors unless you are sure of the snakecase names of all possible submitted type names. SourceFactory avoids this problem by allowing you to declare corresponding types and string names.

Validators

  • bonafide: decorator that validates or converts types based on type annotations of the wrapped function or dataclass (under construction)

ashford`s framework supports a wide range of coding styles. You can create complex multiple inheritance structures with mixins galore or simpler, compositional objects. Even though the data structures are necessarily object-oriented, all of the tools to modify them are also available as functions, for those who prefer a more funcitonal approaching to programming.

The project is also highly internally documented so that users and developers can easily make ashford work with their projects. It is designed for Python coders at all levels. Beginners should be able to follow the readable code and internal documentation to understand how it works. More advanced users should find complex and tricky problems addressed through efficient code.

Metadata

Release files for ashford 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ashford 0.1.5
File Size Uploaded Provenance Actions
ashford-0.1.5.tar.gz 19.9 kB Without provenance Details for ashford-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ashford 0.1.5
File Interpreter ABI Platform Actions
ashford-0.1.5-py3-none-any.whl Python 3 none any Details for ashford-0.1.5-py3-none-any.whl

Total release size: 45.3 kB

Release files / ashford-0.1.5.tar.gz

Download URL ashford-0.1.5.tar.gz
Size 19.9 kB
Tags Source
SHA-256 checksum
How to use checksums
99f91b882e4739993b643755616f8c798cd0775a49ec6be59e0f3404f0810a15
BLAKE2b-256 checksum
How to use checksums
b8d6412c3ffbd29afabc7e6ff2958d3716cad42826d63a790ee975e7c37dea13
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.9.2 Linux/5.10.0-20-amd64

Release files / ashford-0.1.5-py3-none-any.whl

Download URL ashford-0.1.5-py3-none-any.whl
Size 25.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fe1f3ccd5963828d39c0b3f7fcdd2534cd9cd44141ee8fb3d5606ea951e092bc
BLAKE2b-256 checksum
How to use checksums
5e6e819c1701162f094026c4410d77b7ccbf3bf8787b361d1eda0935757d52e8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.2.1 CPython/3.9.2 Linux/5.10.0-20-amd64

Security for ashford 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page