python-trio / python-trio/trio
Write docs on porting code to Trio
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 7.3k
- Forks
- 431
- Avg merge
- 2d 17h
- Merged PRs (30d)
- 6
Description
There should be a section in the docs explicitly addressing the question: I need a library for Trio; it doesn't exist yet; what are my options?
Maybe the best arrangement is as a set of brief case studies, looking at how different libraries have handled this, and the tradeoffs involved in each choice. (What does your library do, do you care about sync, do you care about asyncio, do you care about taking advantage of native trio stuff, etc.)
Strategies to discuss (possibly incomplete):
- native Trio code (example: trio-websocket)
- possibly with sans-I/O
- special case for HTTP API wrappers (examples: gidgethub, this article from @pgjones's colleague)
- trio-asyncio:
- to use existing asyncio libraries
- to incrementally port an application from asyncio to trio
- unasync for "essentially sync" libraries:
- with multiple I/O backends (urllib3)
- with no backend b/c you're a middle-layer that doesn't do I/O anyway (flask)
- anyio
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing Trio documentation and the issue's listed examples and strategies, including trio-websocket, trio-asyncio, unasync, and anyio. Done should be a clearly organized section explaining the available porting options, with brief case studies and the relevant tradeoffs for sync support, asyncio compatibility, and native Trio integration.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100