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.1.tar.gz
(1.8 kB
view hashes)
Built Distribution
Close
Hashes for oneday-0.1.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b10313ff5f9039da6df7ea3d5752716e010e42ddb0e93976e05ed9da4b224a9 |
|
MD5 | 3aac345b608f81c93198b141c51df90f |
|
BLAKE2b-256 | 9fb6528fb776bd1c9c29ee0bf482b1cafebbe21a174875fa1cdd2217e8616a34 |