Skip to main content

CircleCI branch PyPI version PyPI - Python Version Quality Gate Status

Pace Maker

There are times in your life when you have to call legacy api's that can handle like 2 reqs/sec. There is no point hammering the old man and killing him.

This library will help you pace calls to the old man, so his heart keeps ticking.

Combining this library with backoff(https://github.com/litl/backoff) can do wonders.

Install

python3 -m pip install pacemaker

Usage

    from pacemaker import pace_me

    # Function that will yield data that the process function needs
    def data_gen(n=3):
        for i in range(n):
            yield [x for x in range(n)]

    # Will make 3 requests to that url/sec using 1 token everytime process method is called. What data_gen function yields should be the first argument
    @pace_me(data_gen, rate_per_second=3, n=6)
    def process(data, url):
        r = requests.post(url, data=data)

Run tests

  • All tests (docker-compose run --rm test)

Release

  • Add PYPI_API_TOKEN env variable in circle
  • TWINE_PASSWORD used pypi login password which is bad

Metadata

Release files for pacemaker 0.2.8

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

Source distribution (sdist)

Source distribution for pacemaker 0.2.8
File Size Uploaded Provenance Actions
pacemaker-0.2.8.tar.gz 3.5 kB Without provenance Details for pacemaker-0.2.8.tar.gz

Built distribution (wheel)

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

Total release size: 8.3 kB

Release files / pacemaker-0.2.8.tar.gz

Download URL pacemaker-0.2.8.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
ad143b7e4d51743167da41778441124c121591a198a4579d802914e657edc568
BLAKE2b-256 checksum
How to use checksums
b491a264a6bba77669150acc72e334d55a2f8cca118d722ac5250be64dd272e9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Release files / pacemaker-0.2.8-py3-none-any.whl

Download URL pacemaker-0.2.8-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a94ecd59d00913b8ab54fb7237294ebcc9f2bccdd87306bdf2c224a47142ee7
BLAKE2b-256 checksum
How to use checksums
d4c7331796e6ddae6e4ba66fedc85f387048c1584a3165ea94db6a659da77840
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/54.1.2 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8

Security for pacemaker 0.2.8

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.2.8 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