aiotimer
AsyncIO compatible periodic timer. Linux only and very alpha API.
Example
The timer is implemented as a straightforward protocol similar to how the asyncio’s network protocols are handled:
class MyTimer(aiotimer.Protocol):
def __init__(self):
self.counter = 0
def timer_started(self, timer):
self.timer = timer
def timer_ticked(self):
# Callback triggered when the timer interval elapses
...
def timer_overrun(self):
# Callback triggered if the timer_ticked callback runtime
# should exceed the timer interval. Return True to
# reschedule, otherwise the timer is aborted.
return True
def error_received():
...
The protocol can then be used to create a new timer:
# Schedule once every 10th of a second
aiotimer.create_timer(MyTimer, 0.1, loop=loop)
Metadata
Release files for aiotimer 0.1.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 |
|---|---|---|---|---|
| aiotimer-0.1.0.tar.gz | 34.6 kB | Without provenance | Details for aiotimer-0.1.0.tar.gz |
Release files / aiotimer-0.1.0.tar.gz
| Download URL | aiotimer-0.1.0.tar.gz |
|---|---|
| Size | 34.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cd239e161792cbfd1f1fc9d7f206a42b90b588ab9592c09dc6e877c5d3f29b19
|
|
BLAKE2b-256 checksum How to use checksums |
5a4251f4afa9ea19ad41606b2f20ef21cc3a6d6bee18febe16034aaea2570388
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for aiotimer 0.1.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.