YoSTEALTH / Liburing

Liburing is Python + Cython wrapper around C Liburing, which is a helper to setup and tear-down io_uring instances.
https://pypi.org/project/liburing/
Creative Commons Zero v1.0 Universal
98 stars 3 forks source link

io_uring (liburing) python binding asyncio examples request #5

Closed openalmeida closed 4 years ago

openalmeida commented 4 years ago

Hello, Its so happy to find this library released as the first io_uring api stuff for Python.

As a newbie for the io_uring and underlayer Kernel IO API, too many details are required to learn it. Could you provide some asyncio style based python examples for understanding ?

p.s python-3.6.8 with pip-9.0.3 install liburing at newest released Centos (version 8.1.1911), will case datestamp ModuleNotFoundError about "file liburing/setup.py", line 3, thus pip-3 install liburing will fail if not manually run pip-3 install datestamp first.

p.s.s

libs/liburing seems should git clone from https://github.com/axboe/liburing which is empty, and case the pip install liburing process failure.

unless clone this repo to local directory and overwriting libs/liburing by https://github.com/axboe/liburing, and then pip install path/to/this/repo works.

at least works for me :} .

YoSTEALTH commented 4 years ago
  1. for example can you look at test folder files for now?
  2. could you install directly from github using pip install --upgrade git+https://github.com/YoSTEALTH/Liburing
  3. datestamp should have worked as its preinstalled here https://github.com/YoSTEALTH/Liburing/blob/master/pyproject.toml#L2

I will upload newer version to pypy once i get a chance to do more tests

openalmeida commented 4 years ago

thanks for reply.

test folder files seems not relate to Python's asyncio style coding what io_uring and liburing may mainly focus on, and liburing for python binding is brand new (i wanna it working with the async and await keywords in a right way officially) especially for newbie like me.

yes, pip install --upgrade git+https://github.com/YoSTEALTH/Liburing success.

last time i failed because:

  1. I did missing '--upgrade' option which i fool myself "i am do installing liburing fresh new, not upgrade", then it case git's submodule axboe/liburing missing and fail.
  2. Centos (8.1.1911) default builtin pip (9.0.3) is too old to understood the PEP 517 (pyproject.tomal), and pip-3 -U pip solved datestamp not found issue.

so, patch setup.py a PEP 517 support checking maybe an idea for fool proof ?

thanks again for spending of your time.

YoSTEALTH commented 4 years ago

Python liburing is really low level library to something like asyncio. There are plans for Trio to adapt to using io_uring https://github.com/python-trio/trio/issues/932 its still very much in early planning stages, most of the feature needed are only in newer linux version 5.5+ and such...