Skip to main content

A Python DI/component project

Project description

oneday
======

A Python DI/component project.

Example
-------

>>> from import Component
>>> class A:
pass
>>> a = A()
>>> Component.add(a)
>>> Component.get(A) is a
True
>>> @Service.register
class B:
def __init__(self, a: A):
self.a = a
>>> b = Component.create(B)
>>> b.a is a
True

Install
-------

.. code-block:: shell
pip install oneday

Author
------
Yixian Du (duyixian1234@qq.com)

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

oneday-0.2.0.tar.gz (1.6 kB view hashes)

Uploaded Source

Built Distribution

oneday-0.2.0-py3-none-any.whl (2.8 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