skillfed

synchronicity

Export blocking and async library versions from a single async implementation

synchronicity Permissive license Active v0.12.5 released

Install

synchronicity on PyPI

pip

pip install synchronicity

uv

uv add synchronicity

poetry

poetry add synchronicity

Package facts

License not declared (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — typing-extensions
Maintenance actively maintained — 56 days since the last release
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: synchronicity-0.12.5-py3-none-any.whl

License :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3

About synchronicity

from the package's own PyPI description — quoted content, verbatim

CI/CD badge (image) pypi badge (image)

Python 3 has some amazing support for async programming but it's arguably made it a bit harder to develop libraries. Are you tired of implementing synchronous and asynchronous methods doing basically the same thing? This might be a simple solution for you.

Installing

pip install synchronicity

Background: why is anything like this needed

Let's say you have an asynchronous function

python fixture:quicksleep async def f(x): await asyncio.sleep(1.0) return x**2

And let's say (for whatever reason) you want to offer a synchronous API to users. For instance maybe you want to make it easy to run your code in a basic script, or a user is building something that's mostly CPU-bound, so they don't want to bother with asyncio.

A "simple" way to create a synchronous equivalent would be to implement a set of synchronous functions where all they do is call...

Read as markdown · JSON record

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Synchronicity wraps async functions, generators, and classes to expose both synchronous and asynchronous interfaces from a single async implementation, running the async code on a dedicated event loop in a background thread.

Low friction: pure Python wheel with only typing-extensions as a runtime dependency. Last release 56 days ago with active maintenance status.

Apache 2.0 permissive license allows commercial and private use with minimal restrictions, typical for open-source libraries.

Usage

from synchronicity import Synchronizer
import asyncio

synchronizer = Synchronizer()

@synchronizer.wrap
async def async_func(x):
    await asyncio.sleep(0.1)
    return x ** 2

# Synchronous call (blocks)
result = async_func(5)

# Asynchronous call via .aio
async def main():
    result = await async_func.aio(5)

asyncio.run(main())

Requires Python 3.10 or later.

Verdict: Synchronicity solves a genuine pain point—maintaining dual sync/async APIs—by automating wrapper generation and isolating async execution to a separate event loop. No known vulnerabilities, permissive license, minimal dependencies, and active maintenance make it a low-risk choice for libraries needing both interfaces.

Needs verification

  • Performance overhead of thread-based event loop isolation compared to direct asyncio.run() for simple use cases.
  • Compatibility with async frameworks (FastAPI, aiohttp, etc.) when wrapping library code.
  • Thread-safety guarantees when wrapping stateful classes with concurrent access patterns.
async to sync wrapperdual sync async interfaceasyncio thread wrapperconvert async to blockingevent loop isolation libraryasync function synchronizerblocking async wrapper

Similar packages