trio


Nametrio JSON
Version 0.25.0 PyPI version JSON
download
home_page
SummaryA friendly Python library for async concurrency and I/O
upload_time2024-03-17 02:53:47
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT OR Apache-2.0
keywords async io networking trio
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            .. 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/master/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
<https://github.com/python-trio/trio/blob/master/LICENSE>`__,
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 <https://www.python.org/dev/peps/pep-0492/>`__, and
draws inspiration from `many sources
<https://github.com/python-trio/trio/wiki/Reading-list>`__, in
particular Dave Beazley's `Curio <https://curio.readthedocs.io/>`__.
The resulting design is radically simpler than older competitors like
`asyncio <https://docs.python.org/3/library/asyncio.html>`__ and
`Twisted <https://twistedmatrix.com/>`__, 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
<https://github.com/python-trio/trio/wiki/Testimonials>`__.

This project is young and still somewhat experimental: the overall
design is solid, and the existing features are fully tested and
documented, but you may encounter missing functionality or rough
edges. We *do* encourage you to use it, but you should `read and
subscribe to issue #1
<https://github.com/python-trio/trio/issues/1>`__ to get a warning and a
chance to give feedback about any compatibility-breaking changes.


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

**I want to try it out!** Awesome! We have a `friendly tutorial
<https://trio.readthedocs.io/en/stable/tutorial.html>`__ 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
<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-example-tasks-intro>`__,
an `echo client
<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-client-example>`__,
and an `echo server
<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-server-example>`__.

**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
<https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/>`__.
Or, `check out this talk at PyCon 2018
<https://www.youtube.com/watch?v=oLkfnc_UMcE>`__ 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.8-or-better (CPython or `currently maintained versions of
PyPy3 <https://doc.pypy.org/en/latest/faq.html#which-python-versions-does-pypy-implement>`__
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
<https://gitter.im/python-trio/general>`__ or `forum
<https://trio.discourse.group>`__, `filing a bug
<https://github.com/python-trio/trio/issues/new>`__, or `posting a
question on StackOverflow
<https://stackoverflow.com/questions/ask?tags=python+python-trio>`__,
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
<https://trio.readthedocs.io/en/stable/contributing.html>`__!

**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
<https://trio.discourse.group/c/structured-concurrency>`__ (developers
of other systems welcome!). Or check out our `discussion of design
choices
<https://trio.readthedocs.io/en/stable/design.html#user-level-api-principles>`__,
`reading list
<https://github.com/python-trio/trio/wiki/Reading-list>`__, and
`issues tagged design-discussion
<https://github.com/python-trio/trio/labels/design%20discussion>`__.

**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
<https://github.com/python-trio/trio/blob/master/LICENSE>`__ for details.


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

Contributors are requested to follow our `code of conduct
<https://trio.readthedocs.io/en/stable/code-of-conduct.html>`__ in all
project spaces.

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "trio",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "async,io,networking,trio",
    "author": "",
    "author_email": "\"Nathaniel J. Smith\" <njs@pobox.com>",
    "download_url": "https://files.pythonhosted.org/packages/b4/51/4f5ae37ec58768b9c30e5bc5b89431a7baf3fa9d0dda98983af6ef55eb47/trio-0.25.0.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/badge/chat-join%20now-blue.svg\r\n   :target: https://gitter.im/python-trio/general\r\n   :alt: Join chatroom\r\n\r\n.. image:: https://img.shields.io/badge/forum-join%20now-blue.svg\r\n   :target: https://trio.discourse.group\r\n   :alt: Join forum\r\n\r\n.. image:: https://img.shields.io/badge/docs-read%20now-blue.svg\r\n   :target: https://trio.readthedocs.io\r\n   :alt: Documentation\r\n\r\n.. image:: https://img.shields.io/pypi/v/trio.svg\r\n   :target: https://pypi.org/project/trio\r\n   :alt: Latest PyPi version\r\n\r\n.. image:: https://img.shields.io/conda/vn/conda-forge/trio.svg\r\n   :target: https://anaconda.org/conda-forge/trio\r\n   :alt: Latest conda-forge version\r\n\r\n.. image:: https://codecov.io/gh/python-trio/trio/branch/master/graph/badge.svg\r\n   :target: https://codecov.io/gh/python-trio/trio\r\n   :alt: Test coverage\r\n\r\nTrio \u2013 a friendly Python library for async concurrency and I/O\r\n==============================================================\r\n\r\n.. image:: https://raw.githubusercontent.com/python-trio/trio/9b0bec646a31e0d0f67b8b6ecc6939726faf3e17/logo/logo-with-background.svg\r\n   :width: 200px\r\n   :align: right\r\n\r\nThe Trio project aims to produce a production-quality,\r\n`permissively licensed\r\n<https://github.com/python-trio/trio/blob/master/LICENSE>`__,\r\nasync/await-native I/O library for Python. Like all async libraries,\r\nits main purpose is to help you write programs that do **multiple\r\nthings at the same time** with **parallelized I/O**. A web spider that\r\nwants to fetch lots of pages in parallel, a web server that needs to\r\njuggle lots of downloads and websocket connections simultaneously, a\r\nprocess supervisor monitoring multiple subprocesses... that sort of\r\nthing. Compared to other libraries, Trio attempts to distinguish\r\nitself with an obsessive focus on **usability** and\r\n**correctness**. Concurrency is complicated; we try to make it *easy*\r\nto get things *right*.\r\n\r\nTrio was built from the ground up to take advantage of the `latest\r\nPython features <https://www.python.org/dev/peps/pep-0492/>`__, and\r\ndraws inspiration from `many sources\r\n<https://github.com/python-trio/trio/wiki/Reading-list>`__, in\r\nparticular Dave Beazley's `Curio <https://curio.readthedocs.io/>`__.\r\nThe resulting design is radically simpler than older competitors like\r\n`asyncio <https://docs.python.org/3/library/asyncio.html>`__ and\r\n`Twisted <https://twistedmatrix.com/>`__, yet just as capable. Trio is\r\nthe Python I/O library I always wanted; I find it makes building\r\nI/O-oriented programs easier, less error-prone, and just plain more\r\nfun. `Perhaps you'll find the same\r\n<https://github.com/python-trio/trio/wiki/Testimonials>`__.\r\n\r\nThis project is young and still somewhat experimental: the overall\r\ndesign is solid, and the existing features are fully tested and\r\ndocumented, but you may encounter missing functionality or rough\r\nedges. We *do* encourage you to use it, but you should `read and\r\nsubscribe to issue #1\r\n<https://github.com/python-trio/trio/issues/1>`__ to get a warning and a\r\nchance to give feedback about any compatibility-breaking changes.\r\n\r\n\r\nWhere to next?\r\n--------------\r\n\r\n**I want to try it out!** Awesome! We have a `friendly tutorial\r\n<https://trio.readthedocs.io/en/stable/tutorial.html>`__ to get you\r\nstarted; no prior experience with async coding is required.\r\n\r\n**Ugh, I don't want to read all that \u2013 show me some code!** If you're\r\nimpatient, then here's a `simple concurrency example\r\n<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-example-tasks-intro>`__,\r\nan `echo client\r\n<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-client-example>`__,\r\nand an `echo server\r\n<https://trio.readthedocs.io/en/stable/tutorial.html#tutorial-echo-server-example>`__.\r\n\r\n**How does Trio make programs easier to read and reason about than\r\ncompeting approaches?** Trio is based on a new way of thinking that we\r\ncall \"structured concurrency\". The best theoretical introduction is\r\nthe article `Notes on structured concurrency, or: Go statement\r\nconsidered harmful\r\n<https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/>`__.\r\nOr, `check out this talk at PyCon 2018\r\n<https://www.youtube.com/watch?v=oLkfnc_UMcE>`__ to see a\r\ndemonstration of implementing the \"Happy Eyeballs\" algorithm in an\r\nolder library versus Trio.\r\n\r\n**Cool, but will it work on my system?** Probably! As long as you have\r\nsome kind of Python 3.8-or-better (CPython or `currently maintained versions of\r\nPyPy3 <https://doc.pypy.org/en/latest/faq.html#which-python-versions-does-pypy-implement>`__\r\nare both fine), and are using Linux, macOS, Windows, or FreeBSD, then Trio\r\nwill work. Other environments might work too, but those\r\nare the ones we test on. And all of our dependencies are pure Python,\r\nexcept for CFFI on Windows, which has wheels available, so\r\ninstallation should be easy (no C compiler needed).\r\n\r\n**I tried it, but it's not working.** Sorry to hear that! You can try\r\nasking for help in our `chat room\r\n<https://gitter.im/python-trio/general>`__ or `forum\r\n<https://trio.discourse.group>`__, `filing a bug\r\n<https://github.com/python-trio/trio/issues/new>`__, or `posting a\r\nquestion on StackOverflow\r\n<https://stackoverflow.com/questions/ask?tags=python+python-trio>`__,\r\nand we'll do our best to help you out.\r\n\r\n**Trio is awesome, and I want to help make it more awesome!** You're\r\nthe best! There's tons of work to do \u2013 filling in missing\r\nfunctionality, building up an ecosystem of Trio-using libraries,\r\nusability testing (e.g., maybe try teaching yourself or a friend to\r\nuse Trio and make a list of every error message you hit and place\r\nwhere you got confused?), improving the docs, ... check out our `guide\r\nfor contributors\r\n<https://trio.readthedocs.io/en/stable/contributing.html>`__!\r\n\r\n**I don't have any immediate plans to use it, but I love geeking out\r\nabout I/O library design!** That's a little weird? But let's be\r\nhonest, you'll fit in great around here. We have a `whole sub-forum\r\nfor discussing structured concurrency\r\n<https://trio.discourse.group/c/structured-concurrency>`__ (developers\r\nof other systems welcome!). Or check out our `discussion of design\r\nchoices\r\n<https://trio.readthedocs.io/en/stable/design.html#user-level-api-principles>`__,\r\n`reading list\r\n<https://github.com/python-trio/trio/wiki/Reading-list>`__, and\r\n`issues tagged design-discussion\r\n<https://github.com/python-trio/trio/labels/design%20discussion>`__.\r\n\r\n**I want to make sure my company's lawyers won't get angry at me!** No\r\nworries, Trio is permissively licensed under your choice of MIT or\r\nApache 2. See `LICENSE\r\n<https://github.com/python-trio/trio/blob/master/LICENSE>`__ for details.\r\n\r\n\r\nCode of conduct\r\n---------------\r\n\r\nContributors are requested to follow our `code of conduct\r\n<https://trio.readthedocs.io/en/stable/code-of-conduct.html>`__ in all\r\nproject spaces.\r\n",
    "bugtrack_url": null,
    "license": "MIT OR Apache-2.0",
    "summary": "A friendly Python library for async concurrency and I/O",
    "version": "0.25.0",
    "project_urls": {
        "Changelog": "https://trio.readthedocs.io/en/latest/history.html",
        "Documentation": "https://trio.readthedocs.io/",
        "Homepage": "https://github.com/python-trio/trio"
    },
    "split_keywords": [
        "async",
        "io",
        "networking",
        "trio"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "17c9f86f89f14d52f9f2f652ce24cb2f60141a51d087db1563f3fba94ba07346",
                "md5": "b3d62a06a2705abccfdbdcb370e5f1d7",
                "sha256": "e6458efe29cc543e557a91e614e2b51710eba2961669329ce9c862d50c6e8e81"
            },
            "downloads": -1,
            "filename": "trio-0.25.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "b3d62a06a2705abccfdbdcb370e5f1d7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 467161,
            "upload_time": "2024-03-17T02:53:45",
            "upload_time_iso_8601": "2024-03-17T02:53:45.462701Z",
            "url": "https://files.pythonhosted.org/packages/17/c9/f86f89f14d52f9f2f652ce24cb2f60141a51d087db1563f3fba94ba07346/trio-0.25.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b4514f5ae37ec58768b9c30e5bc5b89431a7baf3fa9d0dda98983af6ef55eb47",
                "md5": "bb173bfd26d0f476270fbd554e0819eb",
                "sha256": "9b41f5993ad2c0e5f62d0acca320ec657fdb6b2a2c22b8c7aed6caf154475c4e"
            },
            "downloads": -1,
            "filename": "trio-0.25.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bb173bfd26d0f476270fbd554e0819eb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 551863,
            "upload_time": "2024-03-17T02:53:47",
            "upload_time_iso_8601": "2024-03-17T02:53:47.736211Z",
            "url": "https://files.pythonhosted.org/packages/b4/51/4f5ae37ec58768b9c30e5bc5b89431a7baf3fa9d0dda98983af6ef55eb47/trio-0.25.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-17 02:53:47",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "python-trio",
    "github_project": "trio",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "trio"
}
        
Elapsed time: 0.22112s