trio

Trio – a friendly Python library for async concurrency and I/O

https://github.com/python-trio/trio

Science Score: 36.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    6 of 171 committers (3.5%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (13.9%) to scientific vocabulary

Keywords

async async-await io networking python structured-concurrency trio

Keywords from Contributors

closember unit-testing asyncio http-server http-client templates aiohttp fuzzing jinja pallets
Last synced: 6 months ago · JSON representation

Repository

Trio – a friendly Python library for async concurrency and I/O

Basic Info
  • Host: GitHub
  • Owner: python-trio
  • License: other
  • Language: Python
  • Default Branch: main
  • Homepage: https://trio.readthedocs.io
  • Size: 9.47 MB
Statistics
  • Stars: 6,761
  • Watchers: 80
  • Forks: 365
  • Open Issues: 312
  • Releases: 14
Topics
async async-await io networking python structured-concurrency trio
Created about 9 years ago · Last pushed 6 months ago
Metadata Files
Readme Changelog Contributing License Code of conduct

README.rst

.. image:: https://img.shields.io/badge/chat-join%20now-blue.svg
   :target: https://gitter.im/python-trio/general
   :alt: Join chatroom

.. image:: https://img.shields.io/badge/forum-join%20now-blue.svg
   :target: https://trio.discourse.group
   :alt: Join forum

.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg
   :target: https://trio.readthedocs.io
   :alt: Documentation

.. image:: https://img.shields.io/pypi/v/trio.svg
   :target: https://pypi.org/project/trio
   :alt: Latest PyPi version

.. image:: https://img.shields.io/conda/vn/conda-forge/trio.svg
   :target: https://anaconda.org/conda-forge/trio
   :alt: Latest conda-forge version

.. image:: https://codecov.io/gh/python-trio/trio/branch/main/graph/badge.svg
   :target: https://codecov.io/gh/python-trio/trio
   :alt: Test coverage

Trio – a friendly Python library for async concurrency and I/O
==============================================================

.. image:: https://raw.githubusercontent.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg
   :width: 200px
   :align: right

The Trio project aims to produce a production-quality,
`permissively licensed
`__,
async/await-native I/O library for Python. Like all async libraries,
its main purpose is to help you write programs that do **multiple
things at the same time** with **parallelized I/O**. A web spider that
wants to fetch lots of pages in parallel, a web server that needs to
juggle lots of downloads and websocket connections simultaneously, a
process supervisor monitoring multiple subprocesses... that sort of
thing. Compared to other libraries, Trio attempts to distinguish
itself with an obsessive focus on **usability** and
**correctness**. Concurrency is complicated; we try to make it *easy*
to get things *right*.

Trio was built from the ground up to take advantage of the `latest
Python features `__, and
draws inspiration from `many sources
`__, in
particular Dave Beazley's `Curio `__.
The resulting design is radically simpler than older competitors like
`asyncio `__ and
`Twisted `__, yet just as capable. Trio is
the Python I/O library I always wanted; I find it makes building
I/O-oriented programs easier, less error-prone, and just plain more
fun. `Perhaps you'll find the same
`__.

Trio is a mature and well-tested project: the overall design is solid,
and the existing features are fully documented and widely used in
production. While we occasionally make minor interface adjustments,
breaking changes are rare. We encourage you to use Trio with confidence,
but if you rely on long-term API stability, consider `subscribing to
issue #1 `__ for advance
notice of any compatibility updates.


Where to next?
--------------

**I want to try it out!** Awesome! We have a `friendly tutorial
`__ to get you
started; no prior experience with async coding is required.

**Ugh, I don't want to read all that – show me some code!** If you're
impatient, then here's a `simple concurrency example
`__,
an `echo client
`__,
and an `echo server
`__.

**How does Trio make programs easier to read and reason about than
competing approaches?** Trio is based on a new way of thinking that we
call "structured concurrency". The best theoretical introduction is
the article `Notes on structured concurrency, or: Go statement
considered harmful
`__.
Or, `check out this talk at PyCon 2018
`__ to see a
demonstration of implementing the "Happy Eyeballs" algorithm in an
older library versus Trio.

**Cool, but will it work on my system?** Probably! As long as you have
some kind of Python 3.9-or-better (CPython or `currently maintained versions of
PyPy3 `__
are both fine), and are using Linux, macOS, Windows, or FreeBSD, then Trio
will work. Other environments might work too, but those
are the ones we test on. And all of our dependencies are pure Python,
except for CFFI on Windows, which has wheels available, so
installation should be easy (no C compiler needed).

**I tried it, but it's not working.** Sorry to hear that! You can try
asking for help in our `chat room
`__ or `forum
`__, `filing a bug
`__, or `posting a
question on StackOverflow
`__,
and we'll do our best to help you out.

**Trio is awesome, and I want to help make it more awesome!** You're
the best! There's tons of work to do – filling in missing
functionality, building up an ecosystem of Trio-using libraries,
usability testing (e.g., maybe try teaching yourself or a friend to
use Trio and make a list of every error message you hit and place
where you got confused?), improving the docs, ... check out our `guide
for contributors
`__!

**I don't have any immediate plans to use it, but I love geeking out
about I/O library design!** That's a little weird? But let's be
honest, you'll fit in great around here. We have a `whole sub-forum
for discussing structured concurrency
`__ (developers
of other systems welcome!). Or check out our `discussion of design
choices
`__,
`reading list
`__, and
`issues tagged design-discussion
`__.

**I want to make sure my company's lawyers won't get angry at me!** No
worries, Trio is permissively licensed under your choice of MIT or
Apache 2. See `LICENSE
`__ for details.


Code of conduct
---------------

Contributors are requested to follow our `code of conduct
`__ in all
project spaces.

Owner

  • Name: python-trio
  • Login: python-trio
  • Kind: organization

GitHub Events

Total
  • Create event: 123
  • Issues event: 109
  • Release event: 4
  • Watch event: 575
  • Delete event: 115
  • Issue comment event: 835
  • Push event: 283
  • Gollum event: 2
  • Pull request event: 298
  • Pull request review event: 803
  • Pull request review comment event: 714
  • Fork event: 36
Last Year
  • Create event: 123
  • Issues event: 109
  • Release event: 4
  • Watch event: 575
  • Delete event: 115
  • Issue comment event: 835
  • Push event: 283
  • Gollum event: 2
  • Pull request event: 298
  • Pull request review event: 803
  • Pull request review comment event: 714
  • Fork event: 36

Committers

Last synced: 8 months ago

All Time
  • Total Commits: 4,505
  • Total Committers: 171
  • Avg Commits per committer: 26.345
  • Development Distribution Score (DDS): 0.709
Past Year
  • Commits: 549
  • Committers: 22
  • Avg Commits per committer: 24.955
  • Development Distribution Score (DDS): 0.76
Top Committers
Name Email Commits
Nathaniel J. Smith n****s@p****m 1,311
dependabot-preview[bot] 2****] 426
dependabot[bot] 4****] 303
jakkdl h****b@p****e 247
A5rocks g****t@h****e 204
Joshua Oreman o****j@g****m 191
Quentin Pradet q****t@g****m 176
CoolCat467 5****7 174
dependabot[bot] s****t@d****m 144
Thomas Grainger t****n@g****m 102
Alex Grönholm a****m@n****i 95
pre-commit-ci[bot] 6****] 87
richardsheridan r****n@g****m 86
github-actions[bot] 4****] 78
Laura F. D l@v****f 71
Zack Buhman z****k@b****g 63
Johannes Maria Frank j****3@g****m 52
John Belmonte j****n@n****t 48
Matthias Urlichs m****s@u****e 40
Kyle Altendorf s****a@f****t 40
Spencer Brown s****1@l****m 33
Sebastián Ramírez t****o@g****m 30
Harald Husum h****m@g****m 27
Zac-HD z****s@g****m 23
Tim Stumbaugh s****m@h****m 22
Brett Cannon b****n 18
Guillermo Rodriguez g****r@f****y 16
Jakub Janarek j****k@g****m 15
Almar Klein a****n@g****m 13
Davide Rizzo s****o@g****m 12
and 141 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 264
  • Total pull requests: 847
  • Average time to close issues: about 1 year
  • Average time to close pull requests: about 1 month
  • Total issue authors: 114
  • Total pull request authors: 66
  • Average comments per issue: 6.78
  • Average comments per pull request: 3.54
  • Merged pull requests: 644
  • Bot issues: 2
  • Bot pull requests: 249
Past Year
  • Issues: 72
  • Pull requests: 305
  • Average time to close issues: 20 days
  • Average time to close pull requests: 7 days
  • Issue authors: 28
  • Pull request authors: 23
  • Average comments per issue: 2.32
  • Average comments per pull request: 2.69
  • Merged pull requests: 227
  • Bot issues: 2
  • Bot pull requests: 101
Top Authors
Issue Authors
  • jakkdl (44)
  • njsmith (30)
  • A5rocks (24)
  • Zac-HD (15)
  • graingert (10)
  • oremanj (7)
  • richardsheridan (5)
  • kloczek (4)
  • smurfix (4)
  • mgorny (3)
  • zoranbosnjak (3)
  • webknjaz (2)
  • vxgmichel (2)
  • nalzok (2)
  • allrobot (2)
Pull Request Authors
  • A5rocks (183)
  • pre-commit-ci[bot] (137)
  • jakkdl (106)
  • CoolCat467 (101)
  • github-actions[bot] (74)
  • dependabot[bot] (38)
  • graingert (25)
  • TeamSpen210 (25)
  • richardsheridan (20)
  • oremanj (8)
  • Zac-HD (7)
  • belm0 (7)
  • webknjaz (6)
  • Fuyukai (6)
  • kachida (6)
Top Labels
Issue Labels
design discussion (19) docs (18) good first issue (15) typing (15) user happiness (11) cancellation (8) polish (8) exception handling (8) project meta (7) low-level (7) missing piece (7) debugging (6) todo soon (6) potential API breaker (4) pytest-trio relevant (3) subprocesses (2) threads (2) performance (2) Windows (2) communication (1) skip newsfragment (1) dependencies (1)
Pull Request Labels
dependencies (173) typing (73) skip newsfragment (65) project meta (11) docs (10) user happiness (4) low-level (2) Windows (1) polish (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 28,273,527 last-month
  • Total docker downloads: 217,320,064
  • Total dependent packages: 242
    (may contain duplicates)
  • Total dependent repositories: 7,697
    (may contain duplicates)
  • Total versions: 105
  • Total maintainers: 1
pypi.org: trio

A friendly Python library for async concurrency and I/O

  • Versions: 40
  • Dependent Packages: 229
  • Dependent Repositories: 7,679
  • Downloads: 28,273,527 Last month
  • Docker Downloads: 217,320,064
Rankings
Downloads: 0.1%
Dependent repos count: 0.1%
Dependent packages count: 0.1%
Docker downloads count: 0.3%
Stargazers count: 0.8%
Average: 0.9%
Forks count: 3.9%
Maintainers (1)
Last synced: 6 months ago
proxy.golang.org: github.com/python-trio/trio
  • Versions: 39
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Stargazers count: 0.9%
Forks count: 1.6%
Average: 5.7%
Dependent packages count: 9.6%
Dependent repos count: 10.8%
Last synced: 6 months ago
conda-forge.org: trio
  • Versions: 20
  • Dependent Packages: 13
  • Dependent Repositories: 9
Rankings
Dependent packages count: 4.8%
Stargazers count: 4.8%
Average: 7.9%
Forks count: 10.2%
Dependent repos count: 11.6%
Last synced: 6 months ago
anaconda.org: trio

The Trio project aims to produce a production-quality, permissively licensed, async/await-native I/O library for Python.

  • Versions: 6
  • Dependent Packages: 0
  • Dependent Repositories: 9
Rankings
Stargazers count: 11.3%
Forks count: 19.4%
Average: 30.2%
Dependent repos count: 38.9%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

.github/workflows/autodeps.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
.github/workflows/ci.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • codecov/codecov-action v3 composite
  • deadsnakes/action v2.0.2 composite
  • re-actors/alls-green release/v1 composite
docs-requirements.in pypi
  • attrs >=19.2.0
  • cffi *
  • exceptiongroup >=1.0.0rc9
  • idna *
  • immutables >=0.6
  • jinja2 *
  • outcome *
  • pyOpenSSL *
  • sniffio *
  • sortedcontainers *
  • sphinx >=4.0,<6.2
  • sphinx_rtd_theme *
  • sphinxcontrib-jquery *
  • sphinxcontrib-trio *
  • towncrier *
docs-requirements.txt pypi
  • alabaster ==0.7.13
  • attrs ==23.1.0
  • babel ==2.12.1
  • certifi ==2023.7.22
  • cffi ==1.15.1
  • charset-normalizer ==3.2.0
  • click ==8.1.7
  • click-default-group ==1.2.4
  • cryptography ==41.0.3
  • docutils ==0.18.1
  • exceptiongroup ==1.1.3
  • idna ==3.4
  • imagesize ==1.4.1
  • immutables ==0.20
  • importlib-metadata ==6.8.0
  • importlib-resources ==6.0.1
  • incremental ==22.10.0
  • jinja2 ==3.1.2
  • markupsafe ==2.1.3
  • outcome ==1.2.0
  • packaging ==23.1
  • pycparser ==2.21
  • pygments ==2.16.1
  • pyopenssl ==23.2.0
  • pytz ==2023.3
  • requests ==2.31.0
  • sniffio ==1.3.0
  • snowballstemmer ==2.2.0
  • sortedcontainers ==2.4.0
  • sphinx ==6.1.3
  • sphinx-rtd-theme ==1.3.0
  • sphinxcontrib-applehelp ==1.0.4
  • sphinxcontrib-devhelp ==1.0.2
  • sphinxcontrib-htmlhelp ==2.0.1
  • sphinxcontrib-jquery ==4.1
  • sphinxcontrib-jsmath ==1.0.1
  • sphinxcontrib-qthelp ==1.0.3
  • sphinxcontrib-serializinghtml ==1.1.5
  • sphinxcontrib-trio ==1.1.2
  • tomli ==2.0.1
  • towncrier ==23.6.0
  • urllib3 ==2.0.4
  • zipp ==3.16.2
pyproject.toml pypi
test-requirements.in pypi
  • astor * test
  • async_generator >=1.9 test
  • attrs >=20.1.0 test
  • black * test
  • cffi * test
  • codespell * test
  • coverage >=7.2.5 test
  • cryptography >=41.0.0 test
  • exceptiongroup >=1.0.0rc9 test
  • flake8 * test
  • flake8-pyproject * test
  • idna * test
  • jedi * test
  • mypy * test
  • mypy-extensions * test
  • outcome * test
  • pip-tools >=6.13.0 test
  • pyOpenSSL >=22.0.0 test
  • pylint * test
  • pyright * test
  • pytest >=5.0 test
  • sniffio * test
  • sortedcontainers * test
  • trustme * test
  • types-cffi * test
  • types-pyOpenSSL * test
  • typing-extensions * test
test-requirements.txt pypi
  • astor ==0.8.1 test
  • astroid ==2.15.6 test
  • async-generator ==1.10 test
  • attrs ==23.1.0 test
  • black ==23.7.0 test
  • build ==0.10.0 test
  • cffi ==1.15.1 test
  • click ==8.1.7 test
  • codespell ==2.2.5 test
  • coverage ==7.3.0 test
  • cryptography ==41.0.3 test
  • dill ==0.3.7 test
  • exceptiongroup ==1.1.3 test
  • flake8 ==6.1.0 test
  • flake8-pyproject ==1.2.3 test
  • idna ==3.4 test
  • iniconfig ==2.0.0 test
  • isort ==5.12.0 test
  • jedi ==0.19.0 test
  • lazy-object-proxy ==1.9.0 test
  • mccabe ==0.7.0 test
  • mypy ==1.5.1 test
  • mypy-extensions ==1.0.0 test
  • nodeenv ==1.8.0 test
  • outcome ==1.2.0 test
  • packaging ==23.1 test
  • parso ==0.8.3 test
  • pathspec ==0.11.2 test
  • pip-tools ==7.3.0 test
  • platformdirs ==3.10.0 test
  • pluggy ==1.3.0 test
  • pycodestyle ==2.11.0 test
  • pycparser ==2.21 test
  • pyflakes ==3.1.0 test
  • pylint ==2.17.5 test
  • pyopenssl ==23.2.0 test
  • pyproject-hooks ==1.0.0 test
  • pyright ==1.1.325 test
  • pytest ==7.4.0 test
  • sniffio ==1.3.0 test
  • sortedcontainers ==2.4.0 test
  • tomli ==2.0.1 test
  • tomlkit ==0.12.1 test
  • trustme ==1.1.0 test
  • types-cffi ==1.15.1.15 test
  • types-pyopenssl ==23.2.0.2 test
  • types-setuptools ==68.1.0.0 test
  • typing-extensions ==4.7.1 test
  • wheel ==0.41.2 test
  • wrapt ==1.15.0 test