freshcrate
Skin:/
Home > Databases > asyncer

asyncer

Asyncer, async and await, focused on developer experience.

Why this rank:Strong adoptionRelease freshnessHealthy release cadence

Description

<p align="center"> <a href="https://asyncer.tiangolo.com"><img src="https://asyncer.tiangolo.com/img/logo-margin/logo-margin-vector.svg" alt="Asyncer"></a> </p> <p align="center"> <em>Asyncer, async and await, focused on developer experience.</em> </p> <p align="center"> <a href="https://github.com/fastapi/asyncer/actions?query=workflow%3ATest+event%3Apush+branch%3Amain" target="_blank"> <img src="https://github.com/fastapi/asyncer/actions/workflows/test.yml/badge.svg?event=push&branch=main" alt="Test"> </a> <a href="https://github.com/fastapi/asyncer/actions?query=workflow%3APublish" target="_blank"> <img src="https://github.com/fastapi/asyncer/actions/workflows/publish.yml/badge.svg" alt="Publish"> </a> <a href="https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/asyncer" target="_blank"> <img src="https://coverage-badge.samuelcolvin.workers.dev/fastapi/asyncer.svg" alt="Coverage"> <a href="https://pypi.org/project/asyncer" target="_blank"> <img src="https://img.shields.io/pypi/v/asyncer?color=%2334D058&label=pypi%20package" alt="Package version"> </a> </p> --- **Documentation**: <a href="https://asyncer.tiangolo.com" target="_blank">https://asyncer.tiangolo.com</a> **Source Code**: <a href="https://github.com/fastapi/asyncer" target="_blank">https://github.com/fastapi/asyncer</a> --- **Asyncer** is a small library built on top of <a href="https://anyio.readthedocs.io/en/stable/" class="external-link" target="_blank">AnyIO</a>. **Asyncer** has a small number of utility functions that allow working with `async`, `await`, and concurrent code in a more convenient way under my (<a href="https://twitter.com/tiangolo" class="external-link" target="_blank">@tiangolo - Sebastiรกn Ramรญrez</a>) very opinionated and subjective point of view. The main goal of **Asyncer** is to improve **developer experience** by providing better support for **autocompletion** and **inline errors** in the editor, and **more certainty** that the code is **bug-free** by providing better support for type checking tools like **mypy**. **Asyncer** also tries to improve **convenience** and simplicity when working with **async** code **mixed** with regular <abbr title="synchronous code, code that is not async">**blocking code**</abbr>, allowing to use them together in a simpler way... again, under my very **subjective** point of view. ## Can I Use It? Yes ๐ŸŽ‰ (but continue reading). This is a very small library, there are things that can change and improve in the future. If you use it, **pin the exact Asyncer version** for your project, to make sure it all works. Have **tests** for your project (as you should, anyway). And **upgrade the version** once you know that the new version continues to work correctly. Still, it's **just 4 functions**, so there's not much to change, if you had to refactor your code to update something it would not be much. And if you don't want to add `asyncer` as a dependency to your project, you can also just copy the main file and try out those functions, it's quite small (but in that case you won't get updates easily). ## Requirements As **Asyncer** is based on **AnyIO** it will be also installed automatically when you install **Asyncer**. ## Installation <div class="termy"> ```console $ pip install asyncer ---> 100% Successfully installed asyncer anyio ``` </div> ## How to Use You can read more about each of the use cases and utility functions in **Asyncer** in the <a href="https://asyncer.tiangolo.com/tutorial/" class="external-link" target="_blank">tutorial</a>. As a sneak preview of one of the utilities, you can **call sync code from async code** using `asyncify()`: ```Python import time import anyio from asyncer import asyncify def do_sync_work(name: str): time.sleep(1) return f"Hello, {name}" async def main(): message = await asyncify(do_sync_work)(name="World") print(message) anyio.run(main) ``` **Asyncer**'s `asyncify()` will use AnyIO underneath to do *the smart thing*, avoid blocking the main **async** event loop, and run the **sync**/blocking function in a **worker thread**. ### Editor Support Everything in **Asyncer** is designed to get the best **developer experience** possible, with the best editor support. * **Autocompletion** for function arguments: <img class="shadow" src="https://asyncer.tiangolo.com/img/tutorial/asyncify/image01.png"> * **Autocompletion** for return values: <img class="shadow" src="https://asyncer.tiangolo.com/img/tutorial/asyncify/image02.png"> * **Inline errors** in editor: <img class="shadow" src="https://asyncer.tiangolo.com/img/tutorial/soonify/image02.png"> * Support for tools like **mypy**, that can help you verify that your **code is correct**, and prevent many bugs. ## License This project is licensed under the terms of the [MIT license](https://github.com/fastapi/asyncer/blob/main/LICENSE).

Release History

VersionChangesUrgencyDate
0.0.18### Features * โœจ Add Agent Library Skill, install with `uvx library-skills`. PR [#627](https://github.com/fastapi/asyncer/pull/627) by [@tiangolo](https://github.com/tiangolo). ### Upgrades * ๐Ÿ”ง Upgrade Zensical, refactor and improve its usage. PR [#590](https://github.com/fastapi/asyncer/pull/590) by [@tiangolo](https://github.com/tiangolo). ### Docs * ๐Ÿ“ Update docs badges: remove Publish badge, it doesn't give extra information. PR [#619](https://github.com/fastapi/asyncer/pullHigh6/25/2026
0.0.17Imported from PyPI (0.0.17)Low4/21/2026
0.0.15### Breaking Changes * โž– Drop support for Python 3.9. PR [#476](https://github.com/fastapi/asyncer/pull/476) by [@tiangolo](https://github.com/tiangolo). ### Internal * ๐Ÿ”จ Update script to generate source examples, migrate from Python 3.9 to Python 3.10. PR [#478](https://github.com/fastapi/asyncer/pull/478) by [@tiangolo](https://github.com/tiangolo). * ๐Ÿ‘ท Remove min-max testing of AnyIO, covered by uv resolution. PR [#477](https://github.com/fastapi/asyncer/pull/477) by [@tiangolo](hLow2/20/2026
0.0.14### Internal * ๐Ÿ‘ท Run tests with lower bound uv sync, upgrade `pytest` minimum dependency pin. PR [#464](https://github.com/fastapi/asyncer/pull/464) by [@YuriiMotov](https://github.com/YuriiMotov). * โฌ† Bump prek from 0.3.2 to 0.3.3. PR [#471](https://github.com/fastapi/asyncer/pull/471) by [@dependabot[bot]](https://github.com/apps/dependabot). * โฌ† Bump typer from 0.23.0 to 0.23.1. PR [#470](https://github.com/fastapi/asyncer/pull/470) by [@dependabot[bot]](https://github.com/apps/dependabLow2/16/2026
0.0.13### Docs * ๐Ÿ“ Update management-tasks.md to be in line with management-tasks.md in FastAPI repo. PR [#462](https://github.com/fastapi/asyncer/pull/462) by [@YuriiMotov](https://github.com/YuriiMotov). * ๐Ÿ“ Add contribution instructions about LLM generated code and comments and automated tools for PRs. PR [#449](https://github.com/fastapi/asyncer/pull/449) by [@alejsdev](https://github.com/alejsdev). * ๐Ÿ› Fix copy button in `custom.js`. PR [#448](https://github.com/fastapi/asyncer/pull/448) Low2/11/2026
0.0.12### Breaking Changes * โž– Drop support for Python 3.8. PR [#441](https://github.com/fastapi/asyncer/pull/441) by [@tiangolo](https://github.com/tiangolo). ### Docs * ๐Ÿ“ Update code examples to Python 3.9. PR [#442](https://github.com/fastapi/asyncer/pull/442) by [@YuriiMotov](https://github.com/YuriiMotov). * ๐Ÿ“ Relax the warnings as I have been using Asyncer in production for a while (and other teams as well). PR [#424](https://github.com/fastapi/asyncer/pull/424) by [@tiangolo](https:Low12/26/2025
0.0.11### Fixes * ๐Ÿ“ Add `sniffio` dependency to project requirements. PR [#421](https://github.com/fastapi/asyncer/pull/421) by [@jujumilk3](https://github.com/jujumilk3). ### Docs * ๐Ÿ“ Update docs to use `markdown-include-variants`. PR [#419](https://github.com/fastapi/asyncer/pull/419) by [@YuriiMotov](https://github.com/YuriiMotov). * ๐Ÿ’… Update CSS to explicitly use emoji font. PR [#420](https://github.com/fastapi/asyncer/pull/420) by [@tiangolo](https://github.com/tiangolo). ### InteLow12/1/2025
0.0.10### Upgrades * โฌ†๏ธ Add support for Python 3.14. PR [#387](https://github.com/fastapi/asyncer/pull/387) by [@svlandeg](https://github.com/svlandeg). ### Internal * โฌ† Bump astral-sh/setup-uv from 6 to 7. PR [#386](https://github.com/fastapi/asyncer/pull/386) by [@dependabot[bot]](https://github.com/apps/dependabot). * โฌ† Bump ruff from 0.13.2 to 0.13.3. PR [#383](https://github.com/fastapi/asyncer/pull/383) by [@dependabot[bot]](https://github.com/apps/dependabot). * โฌ† [pre-commit.ci] preLow10/20/2025
0.0.9### Fixes * ๐Ÿ‘ฝ๏ธ Ensure compatibility with AnyIO 4.11.0. PR [#381](https://github.com/fastapi/asyncer/pull/381) by [@svlandeg](https://github.com/svlandeg). ### Docs * ๐Ÿฉบ Take the GH badge only from pushes to the `main` branch. PR [#284](https://github.com/fastapi/asyncer/pull/284) by [@svlandeg](https://github.com/svlandeg). ### Internal * ๐Ÿ”ฅ Remove unused Poetry config file. PR [#382](https://github.com/fastapi/asyncer/pull/382) by [@tiangolo](https://github.com/tiangolo). * โฌ† BLow10/1/2025
0.0.8### Refactors * โ™ป๏ธ Deprecate `asyncify(cancellable=True)` in favor of `asyncify(abandon_on_cancel=True)`, following AnyIO 4.1.0. PR [#202](https://github.com/fastapi/asyncer/pull/202) by [@tiangolo](https://github.com/tiangolo). * โ™ป๏ธ Import `anyio.from_thread` and `anyio.to_thread` explicitly. PR [#201](https://github.com/fastapi/asyncer/pull/201) by [@tiangolo](https://github.com/tiangolo). * โ™ป๏ธ Update `asyncify` to wrap the function with `functools.wraps` like the other functions. PR [#84Low8/24/2024
0.0.7### Internal * ๐Ÿ”ง Add configs for `asyncer-slim`. PR [#152](https://github.com/tiangolo/asyncer/pull/152) by [@tiangolo](https://github.com/tiangolo). In the future Asyncer can include the standard default recommended packages, and `asyncer-slim` can come without those recommended standard packages and with a group of optional dependencies `asyncer-slim[standard]`, equivalent to `asyncer`, for those that want to opt out of those packages.Low4/30/2024
0.0.6### Internal * โฌ† [pre-commit.ci] pre-commit autoupdate. PR [#122](https://github.com/tiangolo/asyncer/pull/122) by [@pre-commit-ci[bot]](https://github.com/apps/pre-commit-ci). * โฌ† Bump dorny/paths-filter from 2 to 3. PR [#118](https://github.com/tiangolo/asyncer/pull/118) by [@dependabot[bot]](https://github.com/apps/dependabot). * โฌ† Bump dawidd6/action-download-artifact from 2.28.0 to 3.1.4. PR [#137](https://github.com/tiangolo/asyncer/pull/137) by [@dependabot[bot]](https://github.com/aLow4/30/2024
0.0.5### Fixes * ๐Ÿ› Fix `syncify` with `raise_sync_error=False` on AnyIO 4.x.x, do not start new event loops unnecessarily. PR [#130](https://github.com/tiangolo/asyncer/pull/130) by [@tiangolo](https://github.com/tiangolo). ### Internal * ๐Ÿ‘ท Update Publish CI Python version to 3.11. PR [#120](https://github.com/tiangolo/asyncer/pull/120) by [@tiangolo](https://github.com/tiangolo).Low2/22/2024
0.0.4### Docs * ๐Ÿ“ Update docstring for `syncify()`, fix name of parameter `raise_sync_error` (remove unused parameter name `check_called_from_async`). PR [#113](https://github.com/tiangolo/asyncer/pull/113) by [@giladsheffer](https://github.com/giladsheffer). ### Internal * ๐Ÿ”ง Add Ruff config. PR [#112](https://github.com/tiangolo/asyncer/pull/112) by [@tiangolo](https://github.com/tiangolo). * ๐Ÿ”ง Adopt Ruff for formatting and linting and upgrade internal tools. PR [#111](https://github.coLow1/28/2024
0.0.3### Features * โœจ Export (import and re-export) `TaskGroup` from `asyncer`. PR [#87](https://github.com/tiangolo/asyncer/pull/87) by [@MarkParker5](https://github.com/MarkParker5). * โœจ Add support for AnyIO 4.x, drop support for Python 3.7. PR [#90](https://github.com/tiangolo/asyncer/pull/90) by [@khiemdoan](https://github.com/khiemdoan). ### Fixes * ๐Ÿ› Add missing dependency `typing_extensions` for Python < 3.10. PR [#89](https://github.com/tiangolo/asyncer/pull/89) by [@ZhymabekRomanLow1/23/2024
0.0.2### Features * โœจ Add compatibility with the next (unreleased) version of AnyIO (4.x.x), with `get_asynclib` utility. PR [#48](https://github.com/tiangolo/asyncer/pull/48) by [@tiangolo](https://github.com/tiangolo). ### Docs * โœ Fix link to FastAPI and Friends newsletter. PR [#13](https://github.com/tiangolo/asyncer/pull/13) by [@JonasKs](https://github.com/JonasKs). * โœ Fix typo in `docs/tutorial/first-steps.md`, from `asyncio` to `anyio`. PR [#11](https://github.com/tiangolo/asyncer/Low11/4/2022
0.0.1* First release. ๐ŸŽ‰ ### Docs * โœ Fix typo in index and README. PR [#4](https://github.com/tiangolo/asyncer/pull/4) by [@sanders41](https://github.com/sanders41). Low1/4/2022

Dependencies & License Audit

Loading dependencies...

Similar Packages

sentry-sdkPython client for Sentry (https://sentry.io)2.69.1
pytest-postgresqlPostgresql fixtures and fixture factories for Pytest.main@2026-09-08
alibabacloud-adb20211201Alibaba Cloud adb (20211201) SDK Library for Pythonmaster@2026-09-07
mirakuruProcess executor (not only) for tests.main@2026-09-04
browser-useMake websites accessible for AI agents0.13.10

More from pypi

markitdownUtility tool for converting various files to Markdown
fastapiFastAPI framework, high performance, easy to learn, fast to code, ready for production
djangoA high-level Python web framework that encourages rapid development and clean, pragmatic design.
flaskA simple framework for building complex web applications.

More in Databases

milvusMilvus is a high-performance, cloud-native vector database built for scalable vector ANN search
onyxOpen Source AI Platform - AI Chat with advanced features that works with every LLM
memgraphHigh-performance open-source in-memory graph database for GraphRAG, AI memory, agentic AI, and real-time graph analytics. Cypher-compatible, built in C++.
sentry-sdkPython client for Sentry (https://sentry.io)