{"id":14117288,"url":"https://github.com/fastapi/asyncer","last_synced_at":"2026-03-27T02:44:10.957Z","repository":{"id":37077743,"uuid":"444565271","full_name":"fastapi/asyncer","owner":"fastapi","description":"Asyncer, async and await, focused on developer experience.","archived":false,"fork":false,"pushed_at":"2026-03-20T12:30:01.000Z","size":2369,"stargazers_count":2390,"open_issues_count":4,"forks_count":86,"subscribers_count":14,"default_branch":"main","last_synced_at":"2026-03-21T04:56:56.061Z","etag":null,"topics":["anyio","async","asyncio","python","trio"],"latest_commit_sha":null,"homepage":"https://asyncer.tiangolo.com/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fastapi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null},"funding":{"github":["tiangolo"]}},"created_at":"2022-01-04T21:14:39.000Z","updated_at":"2026-03-20T12:30:05.000Z","dependencies_parsed_at":"2023-02-04T04:17:33.148Z","dependency_job_id":"2c97f5be-4567-4aca-9907-abbf14d6d492","html_url":"https://github.com/fastapi/asyncer","commit_stats":{"total_commits":98,"total_committers":10,"mean_commits":9.8,"dds":0.6020408163265306,"last_synced_commit":"bf0ae5c4f7977863e5de9d8cd45b8965d925e3b1"},"previous_names":["tiangolo/asyncer"],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/fastapi/asyncer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi%2Fasyncer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi%2Fasyncer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi%2Fasyncer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi%2Fasyncer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fastapi","download_url":"https://codeload.github.com/fastapi/asyncer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fastapi%2Fasyncer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31011823,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-27T02:33:22.146Z","status":"ssl_error","status_checked_at":"2026-03-27T02:33:21.763Z","response_time":164,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anyio","async","asyncio","python","trio"],"created_at":"2024-08-14T18:00:59.762Z","updated_at":"2026-03-27T02:44:10.899Z","avatar_url":"https://github.com/fastapi.png","language":"Python","readme":"\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://asyncer.tiangolo.com\"\u003e\u003cimg src=\"https://asyncer.tiangolo.com/img/logo-margin/logo-margin-vector.svg\" alt=\"Asyncer\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    \u003cem\u003eAsyncer, async and await, focused on developer experience.\u003c/em\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/fastapi/asyncer/actions?query=workflow%3ATest+event%3Apush+branch%3Amain\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/fastapi/asyncer/actions/workflows/test.yml/badge.svg?event=push\u0026branch=main\" alt=\"Test\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/fastapi/asyncer/actions?query=workflow%3APublish\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://github.com/fastapi/asyncer/actions/workflows/publish.yml/badge.svg\" alt=\"Publish\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://coverage-badge.samuelcolvin.workers.dev/redirect/fastapi/asyncer\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://coverage-badge.samuelcolvin.workers.dev/fastapi/asyncer.svg\" alt=\"Coverage\"\u003e\n\u003ca href=\"https://pypi.org/project/asyncer\" target=\"_blank\"\u003e\n    \u003cimg src=\"https://img.shields.io/pypi/v/asyncer?color=%2334D058\u0026label=pypi%20package\" alt=\"Package version\"\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\n**Documentation**: \u003ca href=\"https://asyncer.tiangolo.com\" target=\"_blank\"\u003ehttps://asyncer.tiangolo.com\u003c/a\u003e\n\n**Source Code**: \u003ca href=\"https://github.com/fastapi/asyncer\" target=\"_blank\"\u003ehttps://github.com/fastapi/asyncer\u003c/a\u003e\n\n---\n\n**Asyncer** is a small library built on top of \u003ca href=\"https://anyio.readthedocs.io/en/stable/\" class=\"external-link\" target=\"_blank\"\u003eAnyIO\u003c/a\u003e.\n\n**Asyncer** has a small number of utility functions that allow working with `async`, `await`, and concurrent code in a more convenient way under my (\u003ca href=\"https://twitter.com/tiangolo\" class=\"external-link\" target=\"_blank\"\u003e@tiangolo - Sebastián Ramírez\u003c/a\u003e) very opinionated and subjective point of view.\n\nThe 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**.\n\n**Asyncer** also tries to improve **convenience** and simplicity when working with **async** code **mixed** with regular \u003cabbr title=\"synchronous code, code that is not async\"\u003e**blocking code**\u003c/abbr\u003e, allowing to use them together in a simpler way... again, under my very **subjective** point of view.\n\n## Can I Use It?\n\nYes 🎉 (but continue reading).\n\nThis is a very small library, there are things that can change and improve in the future.\n\nIf you use it, **pin the exact Asyncer version** for your project, to make sure it all works.\n\nHave **tests** for your project (as you should, anyway). And **upgrade the version** once you know that the new version continues to work correctly.\n\nStill, 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.\n\nAnd 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).\n\n## Requirements\n\nAs **Asyncer** is based on **AnyIO** it will be also installed automatically when you install **Asyncer**.\n\n## Installation\n\n\u003cdiv class=\"termy\"\u003e\n\n```console\n$ pip install asyncer\n---\u003e 100%\nSuccessfully installed asyncer anyio\n```\n\n\u003c/div\u003e\n\n## How to Use\n\nYou can read more about each of the use cases and utility functions in **Asyncer** in the \u003ca href=\"https://asyncer.tiangolo.com/tutorial/\" class=\"external-link\" target=\"_blank\"\u003etutorial\u003c/a\u003e.\n\nAs a sneak preview of one of the utilities, you can **call sync code from async code** using `asyncify()`:\n\n```Python\nimport time\n\nimport anyio\nfrom asyncer import asyncify\n\n\ndef do_sync_work(name: str):\n    time.sleep(1)\n    return f\"Hello, {name}\"\n\n\nasync def main():\n    message = await asyncify(do_sync_work)(name=\"World\")\n    print(message)\n\n\nanyio.run(main)\n```\n\n**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**.\n\n### Editor Support\n\nEverything in **Asyncer** is designed to get the best **developer experience** possible, with the best editor support.\n\n* **Autocompletion** for function arguments:\n\n\u003cimg class=\"shadow\" src=\"https://asyncer.tiangolo.com/img/tutorial/asyncify/image01.png\"\u003e\n\n* **Autocompletion** for return values:\n\n\u003cimg class=\"shadow\" src=\"https://asyncer.tiangolo.com/img/tutorial/asyncify/image02.png\"\u003e\n\n* **Inline errors** in editor:\n\n\u003cimg class=\"shadow\" src=\"https://asyncer.tiangolo.com/img/tutorial/soonify/image02.png\"\u003e\n\n* Support for tools like **mypy**, that can help you verify that your **code is correct**, and prevent many bugs.\n\n## License\n\nThis project is licensed under the terms of the [MIT license](https://github.com/fastapi/asyncer/blob/main/LICENSE).\n","funding_links":["https://github.com/sponsors/tiangolo"],"categories":["Python","Asynchronous Programming"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastapi%2Fasyncer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffastapi%2Fasyncer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffastapi%2Fasyncer/lists"}