dependencies helper
Project description
deps_helper [WIP]
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.1.tar.gz
(1.3 kB
view hashes)
Built Distribution
Close
Hashes for deps_helper-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 74df8cd52d6614c58b74364eadf6ce9fe2ec90c9a1902828e73a86a7c449d04a |
|
MD5 | 4d9c110233683d603fc5a7f3fe80a7ae |
|
BLAKE2b-256 | 2beec2c2d308617a84698cc043b28bc28f258107b8a0414f458995c41204c23b |