{"id":13936107,"url":"https://github.com/python-trio/trio-asyncio","last_synced_at":"2025-07-19T21:31:39.323Z","repository":{"id":25826643,"uuid":"106653628","full_name":"python-trio/trio-asyncio","owner":"python-trio","description":"a re-implementation of the asyncio mainloop on top of Trio","archived":false,"fork":false,"pushed_at":"2025-03-17T15:55:06.000Z","size":1554,"stargazers_count":196,"open_issues_count":29,"forks_count":42,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-07-17T08:30:20.827Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/python-trio.png","metadata":{"files":{"readme":"README.rst","changelog":"newsfragments/###.misc.rst","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"python-trio","open_collective":"python-trio"}},"created_at":"2017-10-12T06:29:43.000Z","updated_at":"2025-04-19T00:37:44.000Z","dependencies_parsed_at":"2023-11-11T07:34:04.464Z","dependency_job_id":"9f251b8c-8bd8-469d-bff4-73d923a65113","html_url":"https://github.com/python-trio/trio-asyncio","commit_stats":{"total_commits":518,"total_committers":21,"mean_commits":"24.666666666666668","dds":"0.29729729729729726","last_synced_commit":"ad53a45b16be07d46aca40b560aa25a031c16dfc"},"previous_names":[],"tags_count":27,"template":false,"template_full_name":null,"purl":"pkg:github/python-trio/trio-asyncio","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio-asyncio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio-asyncio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio-asyncio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio-asyncio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-trio","download_url":"https://codeload.github.com/python-trio/trio-asyncio/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio-asyncio/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266019657,"owners_count":23864916,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-08-07T23:02:23.399Z","updated_at":"2025-07-19T21:31:34.314Z","avatar_url":"https://github.com/python-trio.png","language":"Python","funding_links":["https://github.com/sponsors/python-trio","https://opencollective.com/python-trio"],"categories":["Python","Alternatives to asyncio"],"sub_categories":[],"readme":".. image:: https://img.shields.io/pypi/v/trio-asyncio.svg\n   :target: https://pypi.org/project/trio-asyncio\n   :alt: Latest PyPI version\n\n.. image:: https://img.shields.io/badge/chat-join%20now-blue.svg\n   :target: https://gitter.im/python-trio/general\n   :alt: Join chatroom\n\n.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg\n   :target: https://trio-asyncio.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation status\n\n.. image:: https://github.com/python-trio/trio-asyncio/actions/workflows/ci.yml/badge.svg\n   :target: https://github.com/python-trio/trio-asyncio/actions/workflows/ci.yml\n   :alt: Automated test status\n\n.. image:: https://codecov.io/gh/python-trio/trio-asyncio/branch/master/graph/badge.svg\n   :target: https://codecov.io/gh/python-trio/trio-asyncio\n   :alt: Test coverage\n\n\n==============\n trio-asyncio\n==============\n\n**trio-asyncio** is a re-implementation of the ``asyncio`` mainloop on top of\nTrio.\n\ntrio-asyncio requires at least Python 3.8. It is tested on recent versions of\n3.8 through 3.12.\n\n+++++++++++\n Rationale\n+++++++++++\n\nTrio has native concepts of tasks and task cancellation. Asyncio is based\non callbacks and chaining Futures, albeit with nicer syntax, making\nhandling failures and timeouts fundamentally less reliable, especially in\nlarger programs. Thus, you *really* want to base your async project on Trio.\n\nOn the other hand, there are quite a few asyncio-enhanced libraries. You\n*really* don't want to re-invent any wheels in your project.\n\nThus, being able to use asyncio libraries from Trio is useful.\ntrio-asyncio enables you to do that and more.\n\n--------------------------------------\n Transparent vs. explicit translation\n--------------------------------------\n\n``trio_asyncio`` does not try to magically allow calling ``await\ntrio_code()`` from asyncio or vice versa. There are multiple reasons for\nthis; the executive summary is that cross-domain calls can't be made to\nwork correctly, and any such call is likely to result in an irrecoverable\nerror. You need to keep your code's ``asyncio`` and ``trio`` domains\nrigidly separate.\n\nFortunately, this is not difficult.\n\n+++++++\n Usage\n+++++++\n\nTrio-Asyncio's documentation is too large for a README.\n\nFor further information, `see the manual on readthedocs \u003chttp://trio-asyncio.readthedocs.io/en/latest/\u003e`_.\n\n++++++++++++++\n Contributing\n++++++++++++++\n\nLike Trio, trio-asyncio is licensed under both the MIT and Apache licenses.\nSubmitting a patch or pull request implies your acceptance of these licenses.\n\nTesting is done with ``pytest``. Test coverage is pretty thorough; please\nkeep it that way when adding new code.\n\nSee the `Trio contributor guide\n\u003chttps://trio.readthedocs.io/en/stable/contributing.html\u003e`__ for much\nmore detail on how to get involved.\n\nContributors are requested to follow our `code of conduct\n\u003chttps://trio.readthedocs.io/en/stable/code-of-conduct.html\u003e`__ in all\nproject spaces.\n\n++++++++\n Author\n++++++++\n\nMatthias Urlichs \u003cmatthias@urlichs.de\u003e originally wrote trio-asyncio.\nIt is now maintained by the `Trio project \u003chttps://github.com/python-trio\u003e`_.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-trio%2Ftrio-asyncio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-trio%2Ftrio-asyncio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-trio%2Ftrio-asyncio/lists"}