An inversion-of-control (IoC) container for building decoupled, configurable, pluggable applications.
Have a large application where you want to decrease coupling between components? Need to supply configuration to your application’s various services? Want to make a pluggable application where others can supply services?
wired is an implementation of an inversion-of-control (IoC) container and may be used as the core of a dependency injection (DI) framework or simply as a way to separate config-time from runtime for services in an application. It also provides caching such that a container maintains a local copy of each service as they are instantiated.
wired aims to scale down to the simplest cases and up to very large, custom systems. It has one dependency and that dependency has one dependency.
See https://wired.readthedocs.io or docs/index.rst in this distribution for detailed documentation.
- Added wired.dataclasses optional package with support for automatically generating service factories for Python 3.7’s typed-dataclasses. Thanks Paul! See https://github.com/mmerickel/wired/pull/19
- Added a new tutorial on writing a DI framework around Python 3.7’s typed-dataclasses. Thanks again Paul! See https://github.com/mmerickel/wired/pull/16
- wired.ServiceContainer.set has been redefined to set a service instance for a specific context object instead of for a type-of-context. The new method wired.ServiceContainer.register_singleton is a direct replacement for the old behavior.
- Add wired.ServiceContainer.register_factory and wired.ServiceContainer.register_singleton which are per-container analogues to their per-registry variants on wired.ServiceRegistry.
- Edit docs to (a) improve sales pitch, (b) split into a couple of sub-pages, and (c) provide a tutorial. Update README and setup.py description a bit as well. See https://github.com/mmerickel/wired/pull/6
- Add support for Python 3.7.
- Fix an issue where two different service classes with the same name would be treated as the same service, defeating the type-based lookup.
- Improve memory management slightly in cases where many short-lived context objects are used by tracking and cleaning up their weakrefs.
- Initial release.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size wired-0.2.1-py2.py3-none-any.whl (12.9 kB)||File type Wheel||Python version py2.py3||Upload date||Hashes View hashes|
|Filename, size wired-0.2.1.tar.gz (52.9 kB)||File type Source||Python version None||Upload date||Hashes View hashes|
Hashes for wired-0.2.1-py2.py3-none-any.whl