Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.43 KB

README.md

File metadata and controls

36 lines (23 loc) · 1.43 KB

🐍 Python Async Programming Sessions

A repository for exploring asynchronous programming in Python. This collection of examples demonstrates various concurrency models, ranging from simple synchronous HTTP requests to advanced async patterns using decorators, futures, and more.

What is Asynchronous Programming?

Asynchronous programming enables you to write non-blocking, concurrent code using constructs like async/await and event loops. It is ideal for I/O-bound tasks and improves the performance of network and parallel operations without relying solely on multi-threading or multi-processing.

Key Imports & Modules

These examples utilize several Python modules, including:

  • Core Async Tools: asyncio
  • HTTP Clients: aiohttp, requests
  • Concurrency: threading, multiprocessing
  • Utilities: time, functools, os

Examples Included

  • Synchronous Requests:
    Simple HTTP requests using the requests library.

  • Threading & Multiprocessing:
    Demonstrations of running tasks concurrently using threads and processes.

  • Asyncio Basics:
    Creating async functions, using asyncio.sleep, and managing tasks with the event loop.

  • Advanced Async Techniques:
    Handling timeouts, cancellation, and using custom decorators (e.g., for timing execution).


👤 Author: Piotr Lipinski
🗓 Date: March 2025
💬 Feedback: Contributions and suggestions are welcome!