-
-
Notifications
You must be signed in to change notification settings - Fork 343
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Starting an awesome-trio list #1262
Conversation
Codecov Report
@@ Coverage Diff @@
## master #1262 +/- ##
==========================================
+ Coverage 99.57% 99.57% +<.01%
==========================================
Files 106 106
Lines 12827 12836 +9
Branches 984 985 +1
==========================================
+ Hits 12772 12781 +9
Misses 35 35
Partials 20 20
|
However, to get much useful work done you will want to use some of | ||
the great libraries that support trio-flavoured concurrency. This list | ||
is not complete, but gives a starting point. Another great way to find | ||
trio-compatible libraries is to search on PyPI for the `Framework :: trio` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The single-backticks here are causing the CI build to fail: https://travis-ci.org/python-trio/trio/jobs/600224047
I think you want double-backticks, because ReST is annoying like that.
Also, let's capitalize Trio.
* `trio-click <https://github.com/python-trio/trio-click>`__ - Python composable command line utility, trio-compatible version | ||
* `triopg <https://github.com/python-trio/triopg>`__ - PostgreSQL client for Trio based on asyncpg | ||
* `trio-mysql <https://github.com/python-trio/trio-mysql>`__ - Pure Python MySQL Client | ||
* `hypothesis-trio <https://github.com/python-trio/hypothesis-trio>`__ - Hypothesis plugin for trio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm actually not sure what the status is of anything below trio-click
here... maybe just file them under categories, instead of "core" libraries?
trio-click
→ "Building command line apps"
triopg
, trio-mysql
→ already listed under databases
hypothesis-trio
→ "Testing"
---------------------- | ||
|
||
* `asks <https://github.com/theelous3/asks>`__ - asks is an async requests-like http library | ||
* `trustme <https://github.com/python-trio/trustme>`__ - #1 quality TLS certs while you wait, for the discerning tester |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trustme
should also go under "Testing"
--------------------------- | ||
* `anyio <https://github.com/agronholm/anyio>`__ - AnyIO is a asynchronous compatibility API that allows applications and libraries written against it to run unmodified on asyncio, curio and trio. | ||
* `tractor <https://github.com/goodboy/tractor>`__ - tractor is an attempt to bring trionic structured concurrency to distributed multi-core Python. | ||
* `sniffio <https://github.com/python-trio/sniffio>`__ - This is a tiny package whose only purpose is to let you detect which async library your code is running under. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we should have a category for "Trio/Asyncio interoperability", listing trio-asyncio
("use asyncio libraries from a trio app"), anyio
, sniffio
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And tractor
could go under like... "Multi-core/multiprocessing"?
I feel like "Utility libraries" would be more like async-generator
(Makes async generators work (better) on Python 3.5 and Python 3.6), tricycle
, trio-util
* `asks <https://github.com/theelous3/asks>`__ - asks is an async requests-like http library | ||
* `trustme <https://github.com/python-trio/trustme>`__ - #1 quality TLS certs while you wait, for the discerning tester | ||
* `trio-websocket <https://github.com/HyperionGray/trio-websocket>`__ - This library implements the WebSocket protocol, striving for safety, correctness, and ergonomics. | ||
* `quart-trio <https://gitlab.com/pgjones/quart-trio/>`__ - `Quart <https://gitlab.com/pgjones/quart>`__ is a Python ASGI web microframework with the same API as Flask and Quart-Trio is an extension for Quart to support the Trio event loop. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should list hypercorn
too (ASGI server with first-class Trio support)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact how about:
quart-trio
– Like Flask, but for Trio. A simple and powerful framework for building async web applications and REST APIs. Tip: this is an ASGI-based framework, so you'll also need an HTTP server with ASGI support.hypercorn
– An HTTP server for hosting your ASGI apps. Supports HTTP/1.1, HTTP/2, HTTP/3, and Websockets. Can be run as a standalone server, or embedded in a larger Trio app. Use it withquart-trio
, or any other Trio-compatible ASGI framework.
Thanks @njsmith , I'll update this afternoon when I'm done work. |
Test failure is #1231. I'll close/re-open to retry. |
* `triopg <https://github.com/python-trio/triopg>`__ - PostgreSQL client for Trio based on asyncpg | ||
* `trio-mysql <https://github.com/python-trio/trio-mysql>`__ - Pure Python MySQL Client | ||
* `sqlalchemy_aio <https://github.com/RazerM/sqlalchemy_aio>`__ - Add asyncio and Trio support to SQLAlchemy core, derived from alchimia. | ||
* `sphinxcontrib-trio <https://github.com/python-trio/sphinxcontrib-trio>`__ - Make Sphinx better at documenting Python functions and methods |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sphinxcontrib-trio
doesn't have anything to do with databases :-).
Also probably worth mentioning that it makes it easy to document async functions.
----------------------------- | ||
* `anyio <https://github.com/agronholm/anyio>`__ - AnyIO is a asynchronous compatibility API that allows applications and libraries written against it to run unmodified on asyncio, curio and trio | ||
* `sniffio <https://github.com/python-trio/sniffio>`__ - This is a tiny package whose only purpose is to let you detect which async library your code is running under | ||
* `trio-asyncio <https://github.com/python-trio/trio-asyncio>`__ - Trio-Asyncio is a re-implementation of the asyncio mainloop on top of Trio |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While that's true, I think people will get a better idea of why they should care about trio-asyncio if we describe it as "Trio-Asyncio lets you use asyncio libraries from your Trio app."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
many asyncio libraries. Not all of them, aiohttp being the most glaring counterexample.
is not complete, but gives a starting point. Another great way to find | ||
Trio-compatible libraries is to search on PyPI for the ``Framework :: trio`` | ||
tag -> `PyPI Search <https://pypi.org/search/?q=Framework+%3A%3A+trio>`__ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add a "Getting started" section at the top, that says something like:
cookiecutter-trio
: A quickstart template for your Trio project, including pytest-trio
for testing and sphinxcontrib-trio
for documentation.
@jay-tuckey Hey, just wanted to check in and see if you're still interested in working on this – I think it's pretty close, but also I know sometimes stuff comes up :-) |
Co-Authored-By: Nathaniel J. Smith <njs@pobox.com>
Codecov Report
@@ Coverage Diff @@
## master #1262 +/- ##
=========================================
- Coverage 99.57% 93.7% -5.88%
=========================================
Files 106 106
Lines 12827 13288 +461
Branches 984 1004 +20
=========================================
- Hits 12772 12451 -321
- Misses 35 790 +755
- Partials 20 47 +27
|
Co-Authored-By: Nathaniel J. Smith <njs@pobox.com>
Addition: distmqtt https://github.com/smurfix/distmqtt.git which is a mostly-reasonable MQTT client and broker (an anyio-ified fork of hbmqtt). |
The Urwid TUI library has Trio support now https://github.com/urwid/urwid/pull/372/files |
* `trio-click <https://github.com/python-trio/trio-click>`__ - Python composable command line utility, trio-compatible version. | ||
|
||
|
||
Multi-Core/Multiprocessing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be worth tossing trio_run_in_process
here as well.
This is a constantly moving target so we should just merge-then-iterate right? A few opinions:
|
Such a list has been requested a number of times:
As @parity3 says, this list will never be complete - there will (hopefully) always be new, awesome trio projects being developed so I think it would be great to get an initial version in and then new libraries can be added as new PRs on an incremental, ongoing basis. |
@jay-tuckey, thanks for kicking this off! I think what we have here is a great start so if there are no more projects you'd like to add now it would be good to remove the |
Ok, I have removed the [WIP] as suggested, and also added a few more of the libraries people have mentioned. |
Hey @jay-tuckey, it looks like that was the first time we merged one of your PRs! Thanks so much! 🎉 🎂 If you want to keep contributing, we'd love to have you. So, I just sent you an invitation to join the python-trio organization on Github! If you accept, then here's what will happen:
If you want to read more, here's the relevant section in our contributing guide. Alternatively, you're free to decline or ignore the invitation. You'll still be able to contribute as much or as little as you like, and I won't hassle you about joining again. But if you ever change your mind, just let us know and we'll send another invitation. We'd love to have you, but more importantly we want you to do whatever's best for you. If you have any questions, well... I am just a humble Python script, so I probably can't help. But please do post a comment here, or in our chat, or on our forum, whatever's easiest, and someone will help you out! |
Thanks! Merged. The PyPI search does not appears to include too many results but we can fix that in another pull request. |
Making a page right after the tutorial with some links to libraries that have trio support.