onoff
onoff is a Python module that provides the OnOffMixin class which can be used to add on(), off(), and trigger() style events to any Python class.
Example
>>> from onoff import OnOffMixin
>>> class Foo(OnOffMixin):
... def __init__(self):
... self.on("hello", self.hello)
... def hello(self, *args):
... print("Hello: %s" % args)
... def test(self, *args):
... self.trigger("hello", *args)
...
>>> f = Foo()
>>> f.test("Triggered events rock!")
Hello: Triggered events rock!
Metadata
Release files for onoff 1.0.1
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 |
|---|---|---|---|---|
| onoff-1.0.1.tar.gz | 13.5 kB | Without provenance | Details for onoff-1.0.1.tar.gz |
Release files / onoff-1.0.1.tar.gz
| Download URL | onoff-1.0.1.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
094accfbc621d250729ba7824fb5251bf43f1b844a71f11fe523c5b313457b3f
|
|
BLAKE2b-256 checksum How to use checksums |
9144f2849b517e475185d3131d508efc34edbfc325b07d6b35ba38cbc134271b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for onoff 1.0.1
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.