Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

EcmaTimer

PyPI version Supported Python versions PyPI downloads GitHub Actions status Codecov Licence Code style: Black

Installation

From PyPI

python3 -m pip install --upgrade EcmaTimer

From source

git clone https://github.com/inject3r/EcmaTimer.git
cd EcmaTimer
python3 -m pip install .

Example

import asyncio
from EcmaTimer import SetTimer, KillTimer, HandleTimerError, TimerError

async def example_timer_function():
    print("Timer triggered!")
    
async def main():
    try:
        # Set a simple timer that runs every 2 seconds
        timer_id = await SetTimer(example_timer_function, 2000, repeating=True)

        # Simulate waiting for some time before killing the timer
        await asyncio.sleep(10)

        # Kill the timer after 10 seconds
        await KillTimer(timer_id)
        print("Timer killed after 10 seconds.")
    except TimerError as e:
        await HandleTimerError(e.timer_id, e.message)

if __name__ == "__main__":
    asyncio.run(main())

Features

  • Asynchronous timers using asyncio.
  • Repeating and one-shot timers.
  • Exception handling for timer errors.
  • Easy integration into async Python applications.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Issues

If you find a bug or want to request a feature, please open an issue on GitHub.

Metadata

Release files for EcmaTimer 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for EcmaTimer 1.0.0
File Size Uploaded Provenance Actions
ecmatimer-1.0.0.tar.gz 7.1 kB Without provenance Details for ecmatimer-1.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for EcmaTimer 1.0.0
File Interpreter ABI Platform Actions
EcmaTimer-1.0.0-py3-none-any.whl Python 3 none any Details for EcmaTimer-1.0.0-py3-none-any.whl

Total release size: 14.1 kB

Release files / ecmatimer-1.0.0.tar.gz

Download URL ecmatimer-1.0.0.tar.gz
Size 7.1 kB
Tags Source
SHA-256 checksum
How to use checksums
676864370b9e81f623de610aa1a1c14c663fc328f504c8afabfdfb58079f3225
BLAKE2b-256 checksum
How to use checksums
842fa9484fe1d29ffd227194b597a37c518f46f7e1804d332c0c385a7cbec3b3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Release files / EcmaTimer-1.0.0-py3-none-any.whl

Download URL EcmaTimer-1.0.0-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9cbfe89d2809b18ddf8ff0719f6fa0cfef1a53305af50f964186f514a828af45
BLAKE2b-256 checksum
How to use checksums
5c279000eb25b295c20a546d0fbc5a2c12c18ed70f7093c3bd9aaf90fc8e1fc6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for EcmaTimer 1.0.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.

Release history Release notifications | RSS feed

This release
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page