A simple factory implementation written in Python
Project description
Dessine-moi, a simple Python factory
S'il vous plaît, dessine-moi un mouton.
The narrator of Antoine de Saint-Exupéry's Little Prince probably dreamt of a factory like this one...
Motivation
Dessine-moi is a simple Python implementation of the factory pattern. It was born from the need to create dynamically object trees from nested dictionaries (e.g. a JSON document).
Features
- Create a
Factory
object and register types to it - Use dictionaries to create objects from the factory
- Create
attrs
-compatible converters to automatically convert dictionaries to instances of registered types - Customise factories to your needs
Check the documentation for more detail.
License
Dessine-moi is distributed under the terms of the MIT license.
About
Dessine-moi is written and maintained by Vincent Leroy.
The development is supported by Rayference.
Dessine-moi is a component of the Eradiate radiative transfer model.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file dessinemoi-24.1.0.tar.gz
.
File metadata
- Download URL: dessinemoi-24.1.0.tar.gz
- Upload date:
- Size: 17.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81feb5fc66ec660351891c0ccc10c2a87ff49da4adfd1029656dd0ba17449c5 |
|
MD5 | 2cec9a3189e762fa17bf12f42316a73c |
|
BLAKE2b-256 | 6f6da2f0f02020783c118cb8cb8122e25a913f4ccc2520f168fb8f7efe841efa |
File details
Details for the file dessinemoi-24.1.0-py3-none-any.whl
.
File metadata
- Download URL: dessinemoi-24.1.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.12.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20dc657d4a448d096ef1382b8e53c87b91d48bc5edb1becd26e23af409512d71 |
|
MD5 | 7192ea70008ee7f0eee6b0185ce07034 |
|
BLAKE2b-256 | 4146901d5ead7526648197b736774ae4867818b31d4b7c7576549fbeeaf993bf |