A Python DI/component project
Project description
oneday
======
A Python DI/component project.
Example
-------
>>> from import Component, Service
>>> 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 = Service.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, Service
>>> 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 = Service.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.1.0.tar.gz
(1.7 kB
view hashes)
Built Distribution
Close
Hashes for oneday-0.1.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b26af6fb4c79d3a8ac4e4ad00886ff647433411d21d95f7f13023c9f41051a1d |
|
MD5 | e2904c4c0b3c045bd4edea6273f724fa |
|
BLAKE2b-256 | ca1e9f763a1fd3e26236d6d2f8cb90f130c543d0a0bb9b202a45c449599eb89a |