dependencies helper
Project description
dependency helper
Dependency helper for properties of python class
new_Dep = Dependencies.new("A")
class A(new_Dep):
# "_for" can be an array
@new_Dep.register(_for="first_operation")[int] # support type hinting, tested in pyright
def number(self, value):
return value
@new_Dep.guard()
def first_operation():
...
>>> a = A()
>>> a.first_operation()
Traceback (most recent call last):
...
AttributeError: ("follow attributes are not assigned for first_operation => ", [number])
>>> a.number = 2
>>> a.first_operation()
>>>
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
deps_helper-0.1.2.tar.gz
(1.5 kB
view hashes)
Built Distribution
Close
Hashes for deps_helper-0.1.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2a8ee9b6d4e6c451944474005d2654a62c5a073672010d72f3aafe435e1007cd |
|
MD5 | d7dce77e888f55582599860b140ffc5b |
|
BLAKE2b-256 | baa96ec5903f18023146d1639b4b31ab35908acb8c6865279e0b5d393c8b4aaa |