Curio is a coroutine-based library for concurrent Python systems programming. It provides standard programming abstractions such as as tasks, sockets, files, locks, and queues.
Questions tagged [curio]
8 questions
119
votes
1 answer
What is the core difference between asyncio and trio?
Today, I found a library named trio which says itself is an asynchronous API for humans. These words are a little similar with requests'. As requests is really a good library, I am wondering what is the advantages of trio.
There aren't many articles…

Sraw
- 18,892
- 11
- 54
- 87
11
votes
3 answers
Run tests concurrently
I would like to run several tests concurrently using asyncio (/curio/trio) and pytest, but I couldn't find any information on that. Do I need to schedule them myself? And if I do, is there a way to have a nice output that separates (sub-)tests…

cglacet
- 8,873
- 4
- 45
- 60
3
votes
1 answer
Issue with waiting for an Event in curio
I'm using curio to implement a mechanism of two tasks that communicate using a curio.Event object. The first task (called action()) runs first, and awaits the event to be set. The second task (called setter()) runs after the first one, and is…

imriqwe
- 1,455
- 11
- 15
3
votes
1 answer
Combining py.test and trio/curio
I would to combine pytest and trio (or curio, if that is any easier), i.e. write my test cases as coroutine functions. This is relatively easy to achieve by declaring a custom test runner in conftest.py:
@pytest.mark.tryfirst
def…

Nikratio
- 2,338
- 2
- 29
- 43
1
vote
0 answers
Integrate curio with pillow library
curio library provides async aopen() function, while pillow has it's own Image.open. I want to create thumbnail and suggest pillow is smart enough not to load all image into memory while creating thumbnail. It looks like this:
self.image =…

likern
- 3,744
- 5
- 36
- 47
0
votes
1 answer
Is there a way to call `curio.spawn` from within `asyncio.run`
There is a great library that I want to use from a larger project that I'm working on that uses "standard asyncio". Some of the functionality of the library calls curio.spawn which results in an error when called from "standard asyncio". Is there a…

Gary van der Merwe
- 9,134
- 3
- 49
- 80
0
votes
1 answer
Concurrent URL fetching loops with python
I need to run around 500 concurrent loops. Each loop will sequentially fetch a paginated REST endpoint until it reaches the last page of each of the 500 endpoints. Some of these loops have just 5 to 10 pages so it will finish quickly, but others…

Daniel Ferreira Jorge
- 377
- 3
- 13
0
votes
1 answer
How do I make a Python async named pipe server using curio?
How do you create an asynchronous named pipe server with Dave Beazley's curio library? If not that one, is there any library faster and/or more intuitive to use than Python's default asyncio library that I could easily us to write an asynchronous…

Omnifarious
- 54,333
- 19
- 131
- 194