$npx skillfedfor your agent

aiologic

GIL-powered* locking library for Python

With conditionsPyPI Python ModulesReleased Jun 20263.3M downloads / mopermissive licensePure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — aiologic-0.17.1-py3-none-any.whl
v0.17.1 · released 2026-06-27 · Python >=3.8 · 3 runtime deps: sniffio, typing-extensions, wrapt

Yes, if you need to coordinate async tasks across multiple event loops or mix async and sync code—a genuine gap in the standard library. No, if you work only within a single asyncio event loop or use only threading; standard library primitives are simpler and more stable. Yes-with-conditions if you're comfortable with alpha-status software and a single-maintainer project; the library is already in use and carefully designed, but API and behavior may change.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires Python 3.8 or later.
  • Works on CPython and PyPy; Nuitka support is experimental.
  • Low install friction with only three runtime dependencies (sniffio, typing-extensions, wrapt).

License · maintenance · safety

permissive license (permissive) — Permissive licensing: source code under ISC, tests under 0BSD, documentation under CC-BY-4.0, and configuration under CC0-1.0. No restrictions on commercial use or modification of the library itself.

last release 2026-06-27 (48 days) · last repo commit 2026-08-12 · 92 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 3,253,484 downloads/mo, #2,684 on PyPI

Verify before relying

import asyncio
from threading import Thread
import aiologic

lock = aiologic.Lock()

async def func():
    async with lock:
        await asyncio.sleep(1)

Thread(target=asyncio.run, args=[func()]).start()
  • Performance characteristics and fairness guarantees compared to standard library alternatives in various concurrency scenarios.
  • Stability and API maturity given alpha development status and single-maintainer maintenance model.
  • Real-world production usage patterns beyond the one discussion example mentioned in the project status.
Same gist for agents: .md · .json

What it is and what it does

aiologic is a synchronization library that solves a specific problem: coordinating work across Python's different concurrency models. Standard asyncio.Lock fails when tasks from different event loops try to acquire it, and threading.Lock can deadlock in similar scenarios. aiologic provides drop-in replacements—Lock, Event, Semaphore, Barrier, Condition, and Queue primitives—that work correctly whether you're coordinating async tasks within one loop, async tasks across multiple event loops in different threads, or mixing async and sync code.

The library supports asyncio, trio, curio, anyio, gevent, eventlet, and threading. It's built on atomic operations and respects Python's GIL, making it performant on PyPy and compatible with free-threaded CPython 3.13+. The implementation includes fairness guarantees where possible and aims for lock-free designs with minimal context switches. It's in alpha, actively maintained, and already in use by some projects.

Use it for

  • Coordinate async tasks running in separate event loops across multiple threads without deadlock or RuntimeError.
  • Protect shared state when mixing async code (asyncio/trio) with synchronous code in the same application.
  • Build thread-safe async queues and barriers that work across different async frameworks (asyncio, trio, curio, anyio).
  • Implement fair, cancellation-aware locking for complex async workflows with timeouts and checkpoints.
  • Migrate from threading.Lock to an async-aware primitive without rewriting synchronization logic.

Worth the install?

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

With conditions

Yes, if you need to coordinate async tasks across multiple event loops or mix async and sync code—a genuine gap in the standard library.

No, if you work only within a single asyncio event loop or use only threading; standard library primitives are simpler and more stable. Yes-with-conditions if you're comfortable with alpha-status software and a single-maintainer project; the library is already in use and carefully designed, but API and behavior may change.

Install

aiologic on PyPI

Before you install

Low install friction with only three runtime dependencies (sniffio, typing-extensions, wrapt). Actively maintained as of 2026-06-27 with recent activity. Project is in alpha status and developed by a single maintainer in spare time, so stability is not guaranteed despite careful theoretical analysis claimed by the author.

Requires Python 3.8 or later. Works on CPython and PyPy; Nuitka support is experimental.

License in practice

Permissive licensing: source code under ISC, tests under 0BSD, documentation under CC-BY-4.0, and configuration under CC0-1.0. No restrictions on commercial use or modification of the library itself.

Quickstart

import asyncio
from threading import Thread
import aiologic

lock = aiologic.Lock()

async def func():
    async with lock:
        await asyncio.sleep(1)

Thread(target=asyncio.run, args=[func()]).start()

Verify before relying

  • Performance characteristics and fairness guarantees compared to standard library alternatives in various concurrency scenarios.
  • Stability and API maturity given alpha development status and single-maintainer maintenance model.
  • Real-world production usage patterns beyond the one discussion example mentioned in the project status.

Package facts

Licensepermissive license permissive
Python supportSupports the current Python release >=3.8
Install frictionLow. Pure-Python wheel
Runtime dependencies
3 packages
sniffiotyping-extensionswrapt
MaintenanceActively maintained 48 days since the last release
Last repo commit
First released
Downloads3,253,484 / month, #2,684 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 3 - AlphaFramework :: AnyIOFramework :: AsyncIOFramework :: TrioIntended Audience :: DevelopersLicense :: OSI Approved :: ISC License (ISCL)Operating System :: OS IndependentProgramming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Free Threading :: 2 - BetaProgramming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python ModulesTyping :: Typed

Evidence: aiologic-0.17.1-py3-none-any.whl

Tags

Capabilities
cross-thread async lockingthread-safe async primitivesmulti-loop synchronizationasync-sync coordinationGIL-based locking libraryasyncio threading locksevent loop agnostic locks
Topics
async-concurrencythread-safetymulti-framework
PyPI keywords
anyioasyncasync-awaitasyncioconcurrencyeventletgeventgreenletlibrarylockingmypypythonsynchronizationthread-safetythreadingtrio

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 › “cross-thread async locking”

  • aiologicaiologic provides thread-aware and async-aware locking and…
  • aioredlockImplements the Redlock distributed lock algorithm for asyncio,…
  • flufl.lockProvides NFS-safe file locking with timeout support across POSIX and…

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

More Python Modules packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
PyYAML Worth it
PyPI · Python Modules · released Sep 2025

PyYAML parses and emits YAML 1.1 data format, enabling serialization and deserialization of configuration files and Python objects to and from human-readable YAML text.

MITcompiled wheel · 3.8+
1.2Bdownloads / mo
pydantic Worth it
PyPI · Python Modules · released May 2026

Pydantic validates Python data structures against type hints, coercing and checking input at runtime to ensure it matches a declared schema.

MITpure Python · 3.9+
1.1Bdownloads / mo
annotated-types Worth it
PyPI · Python Modules · released Jul 2026

Provides reusable metadata objects for use with PEP-593 `typing.Annotated` to express common constraints like bounds, collection sizes, and predicates on types.

Install it if you use or build libraries that need to express type constraints in a standardized, inspectable way—or if you want to annotate your own types with…

MITpure Python · 3.10+
871.3Mdownloads / mo
typing-inspection Worth it
PyPI · Python Modules · released Aug 2026

Provides runtime tools to inspect and introspect Python type annotations, enabling programmatic examination of type hints at execution time.

MITpure Python · 3.10+
783.0Mdownloads / mo

See also aiorwlock · culsans · anyio · fifolock · asyncgui · aiotools · fasteners · pytest-aio · atomos · janus

Further reading