$npx skillfedfor your agent

aiorwlock

Read write lock for asyncio.

Worth itPyPI Software DevelopmentReleased Feb 20261.3M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aiorwlock-1.5.1-py3-none-any.whl
v1.5.1 · released 2026-02-20 · Python >=3.9

Yes. aiorwlock is a mature, actively maintained library with zero known vulnerabilities, low install friction, and permissive licensing. Install it if you have asyncio code where read-write contention patterns would benefit from allowing concurrent readers; otherwise a simple asyncio.Lock is sufficient.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.9 or later.
  • The task that acquires a lock must also release it; acquiring in one task and releasing in another raises RuntimeError.
  • Low install friction with no runtime dependencies.

License · maintenance · safety

Apache-2.0 (permissive) — Licensed under Apache 2.0 (permissive), allowing use in both open-source and proprietary projects with minimal restrictions.

last release 2026-02-20 (175 days) · last repo commit 2026-08-01 · 175 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,345,391 downloads/mo, #4,022 on PyPI

Verify before relying

import asyncio
import aiorwlock

async def example():
    rwlock = aiorwlock.RWLock()
    async with rwlock.reader_lock:
        print('reader holds lock')
    async with rwlock.writer_lock:
        print('writer holds lock')

asyncio.run(example())
  • Performance characteristics compared to simple mutual exclusion locks under various read/write ratios
  • Thread-safety guarantees or limitations when used across multiple event loops
Same gist for agents: .md · .json

What it is and what it does

aiorwlock implements a read-write lock primitive for asyncio-based Python programs. It maintains separate locks for read and write operations: the read lock can be held by multiple concurrent reader tasks simultaneously, while the write lock is exclusive and blocks all other readers and writers. This design improves performance when data is read frequently but modified infrequently, since readers don't block each other.

The package is a direct port of a CPython patch and has been in production use since 2014. It supports a "fast path" mode that skips context switches when you're confident your locked code contains await statements, trading safety for minor performance gains. The default safe mode ensures fairness by allowing waiting tasks to acquire the lock even if the current holder doesn't yield control.

Use it for

  • Cache or configuration store that is read frequently but updated rarely
  • Shared data structure in an async web service where reads vastly outnumber writes
  • Coordinating access to a resource pool where multiple consumers read status but few modify state
  • Implementing reader-writer patterns in async database connection managers
  • Protecting mutable state in async event handlers where contention is primarily read-heavy

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

aiorwlock is a mature, actively maintained library with zero known vulnerabilities, low install friction, and permissive licensing. Install it if you have asyncio code where read-write contention patterns would benefit from allowing concurrent readers; otherwise a simple asyncio.Lock is sufficient.

Install

aiorwlock on PyPI

Before you install

Low install friction with no runtime dependencies. Actively maintained with recent commits and a stable release history since 2014; supports current Python versions (3.9 through 3.14).

Requires Python 3.9 or later. The task that acquires a lock must also release it; acquiring in one task and releasing in another raises RuntimeError.

License in practice

Licensed under Apache 2.0 (permissive), allowing use in both open-source and proprietary projects with minimal restrictions.

Quickstart

import asyncio
import aiorwlock

async def example():
    rwlock = aiorwlock.RWLock()
    async with rwlock.reader_lock:
        print('reader holds lock')
    async with rwlock.writer_lock:
        print('writer holds lock')

asyncio.run(example())

Verify before relying

  • Performance characteristics compared to simple mutual exclusion locks under various read/write ratios
  • Thread-safety guarantees or limitations when used across multiple event loops

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceActively maintained 175 days since the last release
Last repo commit
First released
Downloads1,345,391 / month, #4,022 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableFramework :: AsyncIOIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.9

Evidence: aiorwlock-1.5.1-py3-none-any.whl

Tags

Capabilities
asyncio read write lockconcurrent reader writer lockasync rwlockasyncio synchronization primitiveasync mutual exclusionreader writer synchronizationasyncio lock multiple readers
Topics
asyncioconcurrencysynchronization
PyPI keywords
aiorwlocklockasyncio

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “async rwlock”

  • aiorwlockProvides read-write locks for asyncio programs, allowing multiple…
  • readerwriterlockProvides reader-writer lock implementations for Python that solve the…
  • asyncstdlibProvides async-compatible versions of Python standard library…

Give your agent the search over MCP, or paste the wish link into any chat.

More Software Development packages

typing-extensions Worth it
PyPI · Software Development · released Jul 2026

Provides backported and experimental type hints for Python 3.9+, allowing use of newer typing features on older Python versions and enabling early experimentation with type system PEPs before they enter the standard library.

PSF-2.0pure Python · 3.9+
1.9Bdownloads / mo
numpy Worth it
PyPI · Software Development · released Aug 2026

NumPy provides an N-dimensional array object and a comprehensive suite of mathematical, linear algebra, Fourier transform, and random number functions for scientific computing in Python.

BSD-3-Clause AND 0BSD AND MIT AND Zlib AND CC0-1.0compiled wheel · 3.12+
1.1Bdownloads / mo
fastapi Worth it
PyPI · Software Development · released Jul 2026

FastAPI is a Python web framework for building REST APIs using type hints, with automatic request validation, serialization, and interactive API documentation.

MITpure Python · 3.10+
568.6Mdownloads / mo
annotated-doc With conditions
PyPI · Software Development · released Jul 2026

Provides a way to document function parameters, class attributes, return types, and variables inline using Python's `Annotated` type hint syntax instead of traditional docstrings.

MITpure Python · 3.9+
456.2Mdownloads / mo
typer Worth it
PyPI · Software Development · released Aug 2026

Typer builds command-line applications from Python functions using type hints, automatically generating help text, argument parsing, and shell completion.

Install it if you are building CLIs in Python.

MITpure Python · 3.10+
369.3Mdownloads / mo
distlib With conditions
PyPI · Software Development · released Jun 2026

Distlib provides low-level packaging utilities for building, distributing, and managing Python software—including metadata handling, version specifiers, wheel support, script installation, and dependency resolution.

permissive licensepure Python
323.3Mdownloads / mo

See also aiologic · fifolock · readerwriterlock · fastrlock · fasteners · locket · portalocker · PyMySQLLock · python-dynamodb-lock · asyncio-pool