Skip to main content
The 2026 Annual Developer Survey is live— take the Survey today!
Filter by
Sorted by
Tagged with
Filter by Employee ID
1 vote
0 answers
34 views

I am building a LangGraph pipeline. Nodes 1 and 2 stream fine via astream_events. Node 3 calls an external API then an llm and the stream just hangs forever. No errors and no timeouts. Sync invoke() ...
Best practices
1 vote
4 replies
146 views

Is it possible to remove a specific item that could be at any position in an asyncio.Queue? Suppose I use a asyncio.Queue for queuing tasks in a fastapi app to process one single task at a time ...
Best practices
0 votes
5 replies
159 views

For iterators, there is a clear protocol: once they are exhausted, they remain exhausted. It is not allowed to create an iterator whose __next__() raises StopIteration and, called once again, return a ...
-1 votes
1 answer
180 views

The Python documentation says: await is a Python keyword that’s commonly used in one of two different ways: await task await coroutine In a crucial way, the behavior of await depends on the type of ...
1 vote
1 answer
239 views

I'm experimenting with Python asyncio and noticed that performance becomes worse when I create a very large number of very small async tasks. import asyncio import time async def tiny_task(): ...
2 votes
0 answers
109 views

I migrated a Python service from sync grpcio calls wrapped in asyncio.to_thread(...) to native grpc.aio to reduce per-call latency, but after the switch I started seeing this error repeatedly in the ...
Advice
0 votes
7 replies
118 views

Currently working on a bot for Stoat (a Discord alternative) and was working with asyncio to hopefully have tasks done at a specific time each day or each week. For example, one would execute my ...
Advice
0 votes
2 replies
75 views

As the title implies, I am attempting to write a Django application to query noise meters remotely and display the real time information in a web page. Currently I am able to display live data in the ...
1 vote
2 answers
119 views

I trying to make ratelimiter for users in aiogram bot with middlware, now I created class for requests and class for ratelimiter, where reuqest are. My problem is what is better for performance and ...
0 votes
2 answers
75 views

I am trying to model a system that uses asyncio and an event loop. I find that if I create an event loop, and start it with run forever it will not process new tasks, unless it has an unfinished ...
3 votes
1 answer
90 views

I often create Jupyter notebooks as plain .py files with # %% cell delimiters, like this: # %% import polars as pl import numpy as np # %% df = pl.read_parquet('my_cool.parquet') ... I can then run ...
Best practices
0 votes
0 replies
37 views

I am creating an async FastAPI service that trigger models via post requests. Each model has a different domain. It should support high throughput and low latency. What is the best way managing it? ...
Best practices
0 votes
0 replies
75 views

For asyncio workloads there's this convenience function that executes passed list of asyncio.Tasks until either a timeout is hit; first Task raises an exception; or all tasks succeed First two ...
0 votes
1 answer
77 views

I'm processing a large pandas DataFrame (500k rows) where each row requires an HTTP request. I switched from requests to aiohttp + asyncio expecting a significant speedup, but the async version runs ...
2 votes
1 answer
120 views

Looking at the documentation for Event Loop, there is this example: import asyncio import concurrent.futures def blocking_io(): # File operations (such as logging) can block the # event loop: ...

15 30 50 per page
1
2 3 4 5
529