Skip to main content

Dependency injection / inversion of control

Project description

di-ioc

Inversion of control / dependency injection for python

TODO:

  • Add AbstractLifetime class for singleton and scoped lifetimes
  • Use ServiceRequest as the key to retrieve a service instead of just a type
    • This would change AbstractServiceProvider, AbstractServiceContainer, ServiceFactory to accept a ServiceRequest object that defines what service needs to be returned. It still allows for retrieving based on a type, but also allows for more complex resolving needs.
    • Maybe add a Resolver layer inside the ServiceProvider that takes the request and ChainMap of service factories to resolve the requested service. It could be customized by user if needed.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

di_ioc-0.0.5.tar.gz (7.0 kB view hashes)

Uploaded Source

Built Distribution

di_ioc-0.0.5-py3-none-any.whl (7.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page