# asyncer

> Asyncer, async and await, focused on developer experience.

- **URL**: https://www.freshcrate.ai/projects/asyncer
- **Author**: pypi
- **Category**: Databases
- **Latest version**: `0.0.17` (2026-04-21)
- **License**: Unknown
- **Source**: https://github.com/fastapi/asyncer
- **Homepage**: https://pypi.org/project/asyncer/
- **Language**: Python
- **GitHub**: 2,412 stars, 89 forks
- **Registry**: pypi (`asyncer`)
- **Tags**: `pypi`

## 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).

## Recent releases

| Version | Date | Urgency | Changes |
| --- | --- | --- | --- |
| `0.0.17` | 2026-04-21 | Low | Imported from PyPI (0.0.17) |
| `0.0.15` | 2026-02-20 | Low | ### 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](h |
| `0.0.14` | 2026-02-16 | Low | ### 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/dependab |
| `0.0.13` | 2026-02-11 | Low | ### 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) |
| `0.0.12` | 2025-12-26 | Low | ### 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: |
| `0.0.11` | 2025-12-01 | Low | ### 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).  ### Inte |
| `0.0.10` | 2025-10-20 | Low | ### 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] pre |
| `0.0.9` | 2025-10-01 | Low | ### 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). * ⬆ B |
| `0.0.8` | 2024-08-24 | Low | ### 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 [#84 |
| `0.0.7` | 2024-04-30 | Low | ### 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. |

## Dependency audit

- **Score**: 79/100
- **Total deps**: 3
- **Resolved**: 1
- **Unresolved**: 2
- **License conflicts**: 0
- **Warnings**: 4
- **Scanned**: 2026-05-25

## Citation

- HTML: https://www.freshcrate.ai/projects/asyncer
- Markdown: https://www.freshcrate.ai/projects/asyncer.md
- Dependencies JSON: https://www.freshcrate.ai/api/projects/asyncer/deps

_Generated by freshcrate.ai. Indexes pypi releases for AI-agent ecosystem packages._
