{"id":13396924,"url":"https://github.com/python-trio/trio","last_synced_at":"2026-02-14T20:17:21.363Z","repository":{"id":37396721,"uuid":"79083614","full_name":"python-trio/trio","owner":"python-trio","description":"Trio – a friendly Python library for async concurrency and I/O","archived":false,"fork":false,"pushed_at":"2025-05-12T20:29:07.000Z","size":9219,"stargazers_count":6509,"open_issues_count":309,"forks_count":352,"subscribers_count":81,"default_branch":"main","last_synced_at":"2025-05-12T21:40:30.678Z","etag":null,"topics":["async","async-await","io","networking","python","structured-concurrency","trio"],"latest_commit_sha":null,"homepage":"https://trio.readthedocs.io","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/.gitkeep","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-01-16T04:45:25.000Z","updated_at":"2025-05-12T15:17:00.000Z","dependencies_parsed_at":"2023-12-10T16:03:50.016Z","dependency_job_id":"e16da566-7c7b-479e-903f-94741494bc2a","html_url":"https://github.com/python-trio/trio","commit_stats":{"total_commits":4171,"total_committers":167,"mean_commits":"24.976047904191617","dds":0.6856868856389355,"last_synced_commit":"c4c8ce41aba240439678d2e6e847721ad441f8ab"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/python-trio%2Ftrio/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/python-trio","download_url":"https://codeload.github.com/python-trio/trio/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253928433,"owners_count":21985793,"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":["async","async-await","io","networking","python","structured-concurrency","trio"],"created_at":"2024-07-30T18:01:07.829Z","updated_at":"2026-02-14T20:17:21.358Z","avatar_url":"https://github.com/python-trio.png","language":"Python","readme":".. 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/forum-join%20now-blue.svg\n   :target: https://trio.discourse.group\n   :alt: Join forum\n\n.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg\n   :target: https://trio.readthedocs.io\n   :alt: Documentation\n\n.. image:: https://img.shields.io/pypi/v/trio.svg\n   :target: https://pypi.org/project/trio\n   :alt: Latest PyPi version\n\n.. image:: https://img.shields.io/conda/vn/conda-forge/trio.svg\n   :target: https://anaconda.org/conda-forge/trio\n   :alt: Latest conda-forge version\n\n.. image:: https://codecov.io/gh/python-trio/trio/branch/main/graph/badge.svg\n   :target: https://codecov.io/gh/python-trio/trio\n   :alt: Test coverage\n\nTrio – a friendly Python library for async concurrency and I/O\n==============================================================\n\n.. image:: https://raw.githubusercontent.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg\n   :width: 200px\n   :align: right\n\nThe Trio project aims to produce a production-quality,\n`permissively licensed\n\u003chttps://github.com/python-trio/trio/blob/main/LICENSE\u003e`__,\nasync/await-native I/O library for Python. Like all async libraries,\nits main purpose is to help you write programs that do **multiple\nthings at the same time** with **parallelized I/O**. A web spider that\nwants to fetch lots of pages in parallel, a web server that needs to\njuggle lots of downloads and websocket connections simultaneously, a\nprocess supervisor monitoring multiple subprocesses... that sort of\nthing. Compared to other libraries, Trio attempts to distinguish\nitself with an obsessive focus on **usability** and\n**correctness**. Concurrency is complicated; we try to make it *easy*\nto get things *right*.\n\nTrio was built from the ground up to take advantage of the `latest\nPython features \u003chttps://www.python.org/dev/peps/pep-0492/\u003e`__, and\ndraws inspiration from `many sources\n\u003chttps://github.com/python-trio/trio/wiki/Reading-list\u003e`__, in\nparticular Dave Beazley's `Curio \u003chttps://curio.readthedocs.io/\u003e`__.\nThe resulting design is radically simpler than older competitors like\n`asyncio \u003chttps://docs.python.org/3/library/asyncio.html\u003e`__ and\n`Twisted \u003chttps://twistedmatrix.com/\u003e`__, yet just as capable. Trio is\nthe Python I/O library I always wanted; I find it makes building\nI/O-oriented programs easier, less error-prone, and just plain more\nfun. `Perhaps you'll find the same\n\u003chttps://github.com/python-trio/trio/wiki/Testimonials\u003e`__.\n\nTrio is a mature and well-tested project: the overall design is solid,\nand the existing features are fully documented and widely used in\nproduction. While we occasionally make minor interface adjustments,\nbreaking changes are rare. We encourage you to use Trio with confidence,\nbut if you rely on long-term API stability, consider `subscribing to\nissue #1 \u003chttps://github.com/python-trio/trio/issues/1\u003e`__ for advance\nnotice of any compatibility updates.\n\n\nWhere to next?\n--------------\n\n**I want to try it out!** Awesome! We have a `friendly tutorial\n\u003chttps://trio.readthedocs.io/en/stable/tutorial.html\u003e`__ to get you\nstarted; no prior experience with async coding is required.\n\n**Ugh, I don't want to read all that – show me some code!** If you're\nimpatient, then here's a `simple concurrency example\n\u003chttps://trio.readthedocs.io/en/stable/tutorial.html#tutorial-example-tasks-intro\u003e`__,\nan `echo client\n\u003chttps://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-client-example\u003e`__,\nand an `echo server\n\u003chttps://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-server-example\u003e`__.\n\n**How does Trio make programs easier to read and reason about than\ncompeting approaches?** Trio is based on a new way of thinking that we\ncall \"structured concurrency\". The best theoretical introduction is\nthe article `Notes on structured concurrency, or: Go statement\nconsidered harmful\n\u003chttps://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/\u003e`__.\nOr, `check out this talk at PyCon 2018\n\u003chttps://www.youtube.com/watch?v=oLkfnc_UMcE\u003e`__ to see a\ndemonstration of implementing the \"Happy Eyeballs\" algorithm in an\nolder library versus Trio.\n\n**Cool, but will it work on my system?** Probably! As long as you have\nsome kind of Python 3.10-or-better (CPython or `currently maintained versions of\nPyPy3 \u003chttps://doc.pypy.org/en/latest/faq.html#which-python-versions-does-pypy-implement\u003e`__\nare both fine), and are using Linux, macOS, Windows, or FreeBSD, then Trio\nwill work. Other environments might work too, but those\nare the ones we test on. And all of our dependencies are pure Python,\nexcept for CFFI on Windows, which has wheels available, so\ninstallation should be easy (no C compiler needed).\n\n**I tried it, but it's not working.** Sorry to hear that! You can try\nasking for help in our `chat room\n\u003chttps://gitter.im/python-trio/general\u003e`__ or `forum\n\u003chttps://trio.discourse.group\u003e`__, `filing a bug\n\u003chttps://github.com/python-trio/trio/issues/new\u003e`__, or `posting a\nquestion on StackOverflow\n\u003chttps://stackoverflow.com/questions/ask?tags=python+python-trio\u003e`__,\nand we'll do our best to help you out.\n\n**Trio is awesome, and I want to help make it more awesome!** You're\nthe best! There's tons of work to do – filling in missing\nfunctionality, building up an ecosystem of Trio-using libraries,\nusability testing (e.g., maybe try teaching yourself or a friend to\nuse Trio and make a list of every error message you hit and place\nwhere you got confused?), improving the docs, ... check out our `guide\nfor contributors\n\u003chttps://trio.readthedocs.io/en/stable/contributing.html\u003e`__!\n\n**I don't have any immediate plans to use it, but I love geeking out\nabout I/O library design!** That's a little weird? But let's be\nhonest, you'll fit in great around here. We have a `whole sub-forum\nfor discussing structured concurrency\n\u003chttps://trio.discourse.group/c/structured-concurrency\u003e`__ (developers\nof other systems welcome!). Or check out our `discussion of design\nchoices\n\u003chttps://trio.readthedocs.io/en/stable/design.html#user-level-api-principles\u003e`__,\n`reading list\n\u003chttps://github.com/python-trio/trio/wiki/Reading-list\u003e`__, and\n`issues tagged design-discussion\n\u003chttps://github.com/python-trio/trio/labels/design%20discussion\u003e`__.\n\n**I want to make sure my company's lawyers won't get angry at me!** No\nworries, Trio is permissively licensed under your choice of MIT or\nApache 2. See `LICENSE\n\u003chttps://github.com/python-trio/trio/blob/main/LICENSE\u003e`__ for details.\n\n\nCode of conduct\n---------------\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","funding_links":["https://github.com/sponsors/python-trio","https://opencollective.com/python-trio"],"categories":["Asynchronous Programming","Python","资源列表","语言资源库","Asynchronous Programming [🔝](#readme)","Alternatives to asyncio","异步编程","网络","备选事件循环"],"sub_categories":["网络","Design Patterns","python"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-trio%2Ftrio","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpython-trio%2Ftrio","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpython-trio%2Ftrio/lists"}