Installation
objerve can be installed by running pip install objerve
Example Usage
Let's say you have a class like that;
class M:
qux = "blue"
def __init__(self):
self.bar = 55
self.foo = 89
self.baz = 121
To watch the changes, you need the add the @watch() as a class decorator. Within the
arguments of the watch decorator you should pass in lists for the keyword arguments of
the attributes you wish to watch.
from objerve import watch
@watch(set={"foo", "qux"}, get={"bar", "foo"}, delete={"baz"})
class M:
qux = "blue"
def __init__(self):
self.bar = 55
self.foo = 89
self.baz = 121
m = M()
m.bar = 233
def abc():
m.foo += 10
m.qux = "red"
def get_foo(m):
m.bar
abc()
m.foo
del m.baz
get_foo(m)
Output:
Set | foo = 89
File "/home/blue/objerve/examples/example.py", line 9, in __init__
self.foo = 89
Set | qux = red
File "/home/blue/objerve/examples/example.py", line 21, in <module>
m.qux = "red"
Get | foo
File "/home/blue/objerve/examples/example.py", line 18, in abc
m.foo += 10
Set | foo = 99
File "/home/blue/objerve/examples/example.py", line 18, in abc
m.foo += 10
Get | foo
File "/home/blue/objerve/examples/example.py", line 29, in <module>
m.foo
Delete | baz
File "/home/blue/objerve/examples/example.py", line 30, in <module>
del m.baz
Get | bar
File "/home/blue/objerve/examples/example.py", line 25, in get_foo
m.bar
Metadata
Release files for objerve 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| objerve-0.2.0.tar.gz | 4.7 kB | Without provenance | Details for objerve-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| objerve-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for objerve-0.2.0-py3-none-any.whl |
Total release size: 9.7 kB
Release files / objerve-0.2.0.tar.gz
| Download URL | objerve-0.2.0.tar.gz |
|---|---|
| Size | 4.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b888fba69b7fb553e82fbfb07e9cc0946d3cea122076dbc8248772f62e96fbae
|
|
BLAKE2b-256 checksum How to use checksums |
915bcdce32fff36c8b78c06f16bcb9c962246863a10abc9d15dc49518c79e1eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Release files / objerve-0.2.0-py3-none-any.whl
| Download URL | objerve-0.2.0-py3-none-any.whl |
|---|---|
| Size | 5.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
18eae315200fa2b9e80b2c8ce9bfe37718e93d9eb59143ff696b378e32f1c589
|
|
BLAKE2b-256 checksum How to use checksums |
918d2dcb82571f66e0b3d64516375f96cf7e313d7cde60b3cefdaa1b6305d0f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.7
|
Security for objerve 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.