python-trio / python-trio/trio

C/Rust libraries and Trio introp documentation

Open
#931 6 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
7.3k
Forks
431
Avg merge
2d 17h
Merged PRs (30d)
6

Description

Suppose I have a C library such as libpq or hiredis which exposes an API for async communication with their servers.
I'd like to create a python client that supports trio as the event loop but performs the socket operations on it's own.
The asyncio version is quite clear, albeit a bit lengthy.
I have not seen an example of a C extension that cooperates with the trio event loop as of yet.

I believe we should document how to do it correctly.
What do you think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the linked aiopg/connection.py example and review how it handles asynchronous socket operations. The issue names no Trio files or tests; define the documentation scope for C or Rust libraries such as libpq or hiredis that perform their own socket operations, with a complete integration example as the done criterion.

Written by the indexing model from the issue text.

Assessment

Tech stack
c, python, rust
Domain
documentation, networking
Issue type
Documentation
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.