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)
======
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)
Built Distribution
oneday-0.2.0-py3-none-any.whl
(2.8 kB
view hashes)