skillfed

syncer

Async to sync converter

syncer v2.0.3 450.1K downloads/30d#6,593 on PyPI77
Permissive license MIT DORMANT released

What it is and what it does

Syncer is a lightweight utility that wraps async functions and coroutines to run them synchronously, eliminating the need to call asyncio.get_event_loop().run_until_complete() directly. It has no runtime dependencies and works by managing the event loop internally.

The package is most useful in testing scenarios where you need to call async code from synchronous test functions or decorators, or when you have a synchronous codebase that needs to consume async libraries. It can be used as a decorator or called directly on a coroutine to get its result synchronously.

Use it for:

  • Run async test functions synchronously in unittest or pytest without rewriting test infrastructure.
  • Call async library functions from synchronous code without manually managing event loops.
  • Decorate async test methods to make them compatible with synchronous test runners.
  • Evaluate coroutines in a REPL or script without boilerplate event loop setup.
  • Integrate async code into legacy synchronous applications during migration.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Syncer converts async functions to synchronous callables, allowing you to run coroutines synchronously without manually managing event loops.

Yes, if you need to run async code synchronously in tests or legacy code. The package is simple, has no dependencies, and carries no security vulnerabilities. However, the dormant maintenance status (last release over a year ago) means you should verify it works with your Python version and be prepared to fork or find alternatives if asyncio internals change significantly in future Python releases.

Install

syncer on PyPI

pip

pip install syncer

uv

uv add syncer

poetry

poetry add syncer

Installing syncer

Before you install

High install friction with no runtime dependencies. The package is dormant—last release was 2023-05-08, over a year ago, with no commits since 2023-11-08. It remains marked Production/Stable and supports Python 3.8–3.11, but the long inactivity means maintenance risk if Python or asyncio internals shift.

License in practice

MIT license (permissive) imposes no restrictions on use, modification, or distribution in your own projects.

Quickstart

from syncer import sync

async def async_fun():
    return 1

b = sync(async_fun)  # convert to synchronous
result = b()  # call synchronously

Verify before relying

  • Whether the package works correctly with Python 3.12+ or newer asyncio implementations.
  • Current state of the GitHub repository and whether maintainer is responsive to issues.

Package facts

License MIT (permissive)
Python support not specified
Install friction high — source build required
Runtime dependencies none
Maintenance dormant — 1,194 days since the last release
Last repo commit
First released
Downloads 450,114/month — #6,593 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: syncer-2.0.3.tar.gz

Keywords: syncer

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Tags

async to sync converterrun coroutines synchronouslyasync function wrapperasyncio event loop shortcuttest async code synchronouslyconvert async to synccoroutine runner
async-testingevent-loop-management

More Testing packages