Skip to main content

Rate Limit Semaphore

Rate limit semaphore for async-style (any core)

PyPI - Python Version PyPI - Implementation PyPI Coverage Status


There are two implementations of rate limit semaphore. Live demo shows how FixedNewPreviousDelaySemaphore and FixedNewFirstDelaySemaphore work


Live demo Live demo

Overview

import datetime
import ralisem

# Or another implementation
sem = ralisem.FixedNewPreviousDelaySemaphore(
    access_times=3, per=datetime.timedelta(seconds=1)
)
async with sem:
    ...

Difference:

  • FixedNewPreviousDelaySemaphore: Sures the last and a new access have a fixed required delay (per / access_times)
  • FixedNewFirstDelaySemaphore: Sures first and last in series (serias is access_times) have a fixed delay (per)

Methods

All of these implementations are inherited from one base TimeRateLimitSemaphoreBase. Check out full methods here

Installation

Via PyPI:

python -m pip install ralisem

Or via GitHub

python -m pip install https://github.com/deknowny/rate-limit-semaphore/archive/main.zip

Contributing

Check out Contributing section

Metadata

Release files for ralisem 0.1.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 ralisem 0.1.0
File Size Uploaded Provenance Actions
ralisem-0.1.0.tar.gz 4.2 kB Without provenance Details for ralisem-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 8.3 kB

Release files / ralisem-0.1.0.tar.gz

Download URL ralisem-0.1.0.tar.gz
Size 4.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e7d2ebcaee0eed3d506640881241dd81e7186c21f7190f9cd82648124a04909
BLAKE2b-256 checksum
How to use checksums
b510ff2dd6b05dcbac24e76bd4a985740e02687ba1cf0cf139fcb3a1d8f743bd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.10 Linux/5.11.0-1028-azure

Release files / ralisem-0.1.0-py3-none-any.whl

Download URL ralisem-0.1.0-py3-none-any.whl
Size 4.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
98dcbdd08f1ae457c8203c271f9b530d185f4898602aca36b210bf36cf611ba7
BLAKE2b-256 checksum
How to use checksums
bf94e63620989b6ddc7d4d83d8c75998b35b09ecdf9bdc737e05c1a24a2bbe37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.9.10 Linux/5.11.0-1028-azure

Security for ralisem 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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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