xiio

really simple async runtime
git clone https://git.ce9e.org/xiio.git

commit
5395e355f1325dd1a5a621148a18020615e612e6
parent
47d701f6d787451e3cbb15c5ef1f6dd28ffb617e
Author
Tobias Bengfort <tobias.bengfort@posteo.de>
Date
2026-02-26 22:55
add README

Diffstat

A README.md 38 ++++++++++++++++++++++++++++++++++++++

1 files changed, 38 insertions, 0 deletions


diff --git a/README.md b/README.md

@@ -0,0 +1,38 @@
   -1     1 # xiio - really simple async runtime
   -1     2 
   -1     3 xiio (Ξ-I/O) is yet another async runtime for Python, like
   -1     4 [asyncio](https://docs.python.org/3/library/asyncio.html) or
   -1     5 [trio](https://github.com/python-trio/trio/). Both of these libraries have ~10k
   -1     6 lines of code, while this one has a few hundred lines. So I guess it is fair to
   -1     7 say that it is *really simple*.
   -1     8 
   -1     9 ## Usage
   -1    10 
   -1    11 ```python
   -1    12 import sys
   -1    13 import xiio
   -1    14 
   -1    15 
   -1    16 async def greet(name):
   -1    17     await xiio.sleep(len(name) / 10)
   -1    18     print(f'Hello, {name}!')
   -1    19 
   -1    20 
   -1    21 async def main():
   -1    22     name1 = (await xiio.read(sys.stdin, 32)).decode()
   -1    23     name2 = (await xiio.read(sys.stdin, 32)).decode()
   -1    24 
   -1    25     await xiio.gather([
   -1    26         greet(name1),
   -1    27         greet(name2),
   -1    28     ])
   -1    29 
   -1    30 
   -1    31 xiio.run(main())
   -1    32 ```
   -1    33 
   -1    34 ## Design
   -1    35 
   -1    36 I spent quite some time creating meaningful commits. So if you want to
   -1    37 understand why all the individual pieces are there and how they fit together, I
   -1    38 encourage you to check the commit history.