Type something to search...

Blog

Using concurrent.futures for Simple Parallelism in Python

Using concurrent.futures for Simple Parallelism in Python

Most scripts that need to "do things in parallel" don't need a framework. They have a list of URLs to fetch, files to process, or numbers to crunch,

Continue Reading
Understanding the GIL and Free-Threaded Python

Understanding the GIL and Free-Threaded Python

Sooner or later every Python developer writes a multithreaded loop, runs it on an eight-core machine, and watches it finish no faster than the single

Continue Reading
Threading vs Multiprocessing vs Asyncio in Python: Which Should You Use?

Threading vs Multiprocessing vs Asyncio in Python: Which Should You Use?

Python gives you three built-in ways to do more than one thing at a time: threads, processes, and asyncio. They look similar from a distance, since a

Continue Reading
Asyncio in Python: A Beginner's Guide to Asynchronous Programming

Asyncio in Python: A Beginner's Guide to Asynchronous Programming

A lot of programs spend most of their time waiting. A web scraper waits for pages to download, an API server waits for the database, a chat bot waits

Continue Reading
Async MongoDB in Python with Motor and FastAPI

Async MongoDB in Python with Motor and FastAPI

FastAPI runs your endpoints on an event loop. That's what lets a single worker juggle hundreds of concurrent requests: while one request waits on the

Continue Reading
Preventing NoSQL Injection Attacks in MongoDB Applications

Preventing NoSQL Injection Attacks in MongoDB Applications

A lot of developers pick up MongoDB and quietly assume injection is a SQL problem. There's no query string to concatenate, the driver takes objects,

Continue Reading