Skip to main content

=============== aioredis-semaphore

A distributed semaphore and mutex built on Redis.

Installation

To install aioredis-semaphore, simply::

pip install aioredis-semaphore

Examples

::

# -*- coding:utf-8 -*-
import anyio
from aioredis import Redis
from anyio import create_task_group, run

from aioredis_semaphore import Semaphore

semaphore = Semaphore(Redis(), count=2, namespace="example")


async def task(i: int) -> None:
    async with semaphore:
        print("id: {}".format(i))
        print("sleep...")
        await anyio.sleep(2)


async def main() -> None:
    async with create_task_group() as tg:
        for i in range(5):
            tg.start_soon(task, i)


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

Metadata

Release files for aioredis-semaphore 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 aioredis-semaphore 0.1.0
File Size Uploaded Provenance Actions
aioredis_semaphore-0.1.0.tar.gz 3.5 kB Without provenance Details for aioredis_semaphore-0.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 7.1 kB

Release files / aioredis_semaphore-0.1.0.tar.gz

Download URL aioredis_semaphore-0.1.0.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
cdefd3540d5a59ae61ed93c5362bd1fe7c082ad466605150eed8123d0439c11a
BLAKE2b-256 checksum
How to use checksums
5644972779b4860c7c77e475940fb6a471fbe38805da13a6b2eda0a2cd5cb646
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/5.4.0-126-generic

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

Download URL aioredis_semaphore-0.1.0-py3-none-any.whl
Size 3.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
578732f4f1cf32480aee580180dc5e64d7abc9b86c752622323fa2e02a4c1f4d
BLAKE2b-256 checksum
How to use checksums
322d9535df43323f1e2b34cf897515d26cb15d0beea7f7c3a98f9ff25ba2a8b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.3.2 CPython/3.10.9 Linux/5.4.0-126-generic

Security for aioredis-semaphore 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