{"id":19311593,"url":"https://github.com/rednafi/think-async","last_synced_at":"2025-04-09T17:26:03.914Z","repository":{"id":38961776,"uuid":"270045653","full_name":"rednafi/think-async","owner":"rednafi","description":"🌿 Exploring cooperative concurrency primitives in Python","archived":false,"fork":false,"pushed_at":"2024-02-12T18:53:33.000Z","size":834,"stargazers_count":233,"open_issues_count":11,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T10:48:59.705Z","etag":null,"topics":["async","asyncio","concurrency","coroutines","multiprocessing","python","queue","threading"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rednafi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-06-06T16:59:30.000Z","updated_at":"2025-02-02T16:27:55.000Z","dependencies_parsed_at":"2023-02-16T10:10:26.503Z","dependency_job_id":"28f30fd6-09bf-4abb-9b79-a7603424ff49","html_url":"https://github.com/rednafi/think-async","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fthink-async","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fthink-async/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fthink-async/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rednafi%2Fthink-async/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rednafi","download_url":"https://codeload.github.com/rednafi/think-async/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248076093,"owners_count":21043708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","asyncio","concurrency","coroutines","multiprocessing","python","queue","threading"],"created_at":"2024-11-10T00:29:31.236Z","updated_at":"2025-04-09T17:26:03.897Z","avatar_url":"https://github.com/rednafi.png","language":"Python","readme":"\u003cdiv align=\"center\"\u003e\n\n![async](https://user-images.githubusercontent.com/30027932/114286121-d4fef400-9a7d-11eb-9e1c-34904ac79aa3.png)\n\n\n🌿 Exploring different concurrency paradigms in Python\n\n[![Awesome](https://awesome.re/badge-flat.svg)](https://awesome.re)\n[![License](https://img.shields.io/cocoapods/l/AFNetworking?style=flat-square)](https://github.com/rednafi/think-asyncio/blob/master/LICENSE)\n\n\u003c/div\u003e\n\n\n\u003cdiv align=\"center\"\u003e\n\n## Description\n\nThis repository contains links to some awesome blog posts, books, talks, and docs to get you up and running with Python's asynchronous paradigm. It tries to avoid resources that are outdated or contain deprecated APIs that make the async subspace of Python seem overly complicated, especially for beginners.\n\n\u003c/div\u003e\n\n\n## Concepts \u0026 philosophy\n\n* [Sync vs. async Python: what is the difference?](https://blog.miguelgrinberg.com/post/sync-vs-async-python-what-is-the-difference) -\u003e Differences between sync and async Python, and when async is the right tool to solve your concurrency problems\n\n* [Why do we need coroutines in Python?](https://stackoverflow.com/questions/40925797/why-do-we-need-coroutines-in-python)\n\n* [Generators \u0026 coroutines - David Beazly](http://www.dabeaz.com/coroutines/Coroutines.pdf) -\u003e This is outdated and uses python 2x but the underlying concept is still relevant\n\n\n* [Concurrency for people in a hurry - FastAPI doc](https://fastapi.tiangolo.com/async/) -\u003e Simple high-level overview of concurrency in general\n\n* [How the heck does async/await work in Python 3.5?](https://snarky.ca/how-the-heck-does-async-await-work-in-python-3-5/) -\u003e Good intro to async but slightly outdated\n\n* [Unyielding - why threads are bad?](https://glyph.twistedmatrix.com/2014/02/unyielding.html) -\u003e Glyph, the creator of the Twisted projects argues why writing multi-threaded code correctly is hard\n\n* [Nathaniel J. Smith - Notes on structured concurrency, or: go statement considered harmful](https://vorpus.org/blog/notes-on-structured-concurrency-or-go-statement-considered-harmful/) -\u003e Nataniel Smith argues that Dijkstra's strurctured programming philosophy can show us the correct way of doing concurrent I/O programming\n\n* [Nathaniel J. Smith - Timeouts and cancellation for humans](https://vorpus.org/blog/timeouts-and-cancellation-for-humans/) -\u003e Nathaniel Smith ponders on the ways timeout and cancellation can be handled across different concurrency primitives\n\n* [Some thoughts on asynchronous API design in a post-async/await world](https://vorpus.org/blog/some-thoughts-on-asynchronous-api-design-in-a-post-asyncawait-world/) -\u003e Conundrums of crafting causality-compliant, coroutine-chauffeured concurrency-contraptions—catering callback compliance\n\n## Asyncio overview\n\n* [AsyncIO in Python: A complete walkthrough](https://realpython.com/async-io-python/) -\u003e Start grasping the bare-minimum concepts from here.\n\n* [Asyncio for the working Python developer](https://yeray.dev/python/asyncio/asyncio-for-the-working-python-developer) -\u003e Getting your hands dirty with the async features.\n\n* [Calling sync from async \u0026 vice versa](https://www.aeracode.org/2018/02/19/python-async-simplified/) -\u003e Fantastic article on the gradual adoption of Asyncio.\n\n\n## Asyncio API\n\n* [Guide to concurrency in Python with asyncio](https://www.integralist.co.uk/posts/python-asyncio/#gather) -\u003e Asyncio's *create_task*, *ensure_future*, *wait*, *wait_for*, *gather* APIs.\n\n* [Waiting in asyncio](https://hynek.me/articles/waiting-in-asyncio/) -\u003e Difference between *gather*, *wait*, *wait_for*, *create_task*, *as_completed*, etc.\n\n* [Latency in asynchronous Python](https://nullprogram.com/blog/2020/05/24/) -\u003e Using *asyncio.Queue(maxsize=1)* to run blocking code.\n\n* [Difference between asyncio gather \u0026 wait](https://stackoverflow.com/questions/42231161/asyncio-gather-vs-asyncio-wait#:~:text=gather%20mainly%20focuses%20on%20gathering,just%20waits%20on%20the%20futures.)\n\n* [Differences among asyncio ensure_future, create_task \u0026 simple coroutines](https://stackoverflow.com/questions/36342899/asyncio-ensure-future-vs-baseeventloop-create-task-vs-simple-coroutine#:~:text=ensure_future%20is%20a%20method%20to,implement%20this%20function%20different%20ways.)\n\n* [Does asyncio gather guarantees execution \u0026 result order?](https://stackoverflow.com/questions/54668701/asyncio-gather-scheduling-order-guarantee#:~:text=Yes%2C%20at%20least%20from%20the,of%20them%20one%20by%20one.)\n\n\n## Examples\n\n* [Asynchronous I/O examples](https://github.com/rednafi/think-async/tree/master/examples) -\u003e Self contained examples of how to perform a few common asynchronous I/O tasks\n\n* [Asyncio by examples](https://www.pythonsheets.com/notes/python-asyncio.html#) -\u003e A dense example-driven overview of the Asyncio APIs\n\n* [Simple IPv4 TCP scanner leveraging asyncio](https://github.com/rednafi/tcp-port-scanner) -\u003e A complete example of using asynchronous producer-consumer pattern to create a simple TCP scanner\n\n\n## Books\n\n* [Using asyncio in Python - Caleb Hattingh](https://www.goodreads.com/book/show/50083143-using-asyncio-in-python?ac=1\u0026from_search=true\u0026qid=Ozrygzthcs\u0026rank=3)\n\n\n## Tutorials\n\n* [Python threading tutorial: Run code concurrently using the 'threading' module](https://www.youtube.com/watch?v=IEEhzQoKtQU) -\u003e Corey Schafer explains how to use the built-in threading module in Python to achieve concurrency\n\n* [Python multiprocessing tutorial: Run code parallelly using the 'multiprocessing' module](https://www.youtube.com/watch?v=fKl2JW_qrso\u0026t=36s) -\u003e Corey Schafer explains how to use the built-in multiprocessing module in Python to achieve parallelism\n\n## Talks\n\n* [Understanding async and await in Python - Jonathan Slenders](https://www.youtube.com/watch?v=a_wWnxH2o0Y) -\u003e A succinct introduction to asyncio in Python.\n\n* [Raymond Hettinger - Keynote on concurrency - PyBay 2017](https://www.youtube.com/watch?v=9zinZmE3Ogk) -\u003e Raymond Rettinger mostly talking about threads, queues, and processes.\n\n* [Robert Smallshire - Coroutine concurrency in Python 3 with asyncio](https://www.youtube.com/watch?v=c5wodlqGK-M\u0026t=2782s) -\u003e Gradually building up the intuition for coroutine driven I/O.\n\n* [David Beazley - Fear and awaiting in async: A savage journey to the heart of the coroutine dream](https://www.youtube.com/watch?v=E-1Y4kSsAFc\u0026list=RDQMFa6jr3zatoc\u0026index=3) -\u003e Reasoning asynchronous programming from first principles.\n\n* [Import asyncio - YouTube series](https://www.youtube.com/watch?v=Xbl7XjFYsN4\u0026t=18s) -\u003e Łukasz Langa's asyncio videos—from basics to application.\n\n* [Yury Selivanov - High performance networking in Python](https://www.youtube.com/watch?v=pi49aiLBas8) -\u003e The talk covers the async/await syntax in Python, asyncio library and ecosystem around it, and ways to use them for creating high performance servers.\n\n* [Yury Selivanov - Async/await in Python 3.5 and why it is awesome](https://www.youtube.com/watch?v=m28fiN9y_r8\u0026t=1s) -\u003e An overview of asyncio's high-level APIs\n\n* [Yury Selivanov - Asyncio: what's next - PyBay2018](https://www.youtube.com/watch?v=vem5GHboRNM) -\u003e Another walkthrough of asyncio APIs and speculations on future improvements.\n\n* [Yury Selivanov - Asyncio in Python 3.7 and 3.8 || A guide to asynchronous programming in Python with asyncio](https://www.youtube.com/watch?v=5ZUXg5uzrGU\u0026t=4s) -\u003e Asyncio's past, present and future.\n\n* [Build your own async - YouTube screencast](https://www.youtube.com/watch?v=Y4Gt3Xjd7G8) -\u003e David Beazley's takes you through building your own asyncio-like library.\n\n* [John Reese - Thinking outside the GIL with asyncio and multiprocessing - PyCon 2018](https://www.youtube.com/watch?v=0kXaLh8Fz3k\u0026t=125s) -\u003e Superpowered asyncio with multiprocessing.\n\n* [Nathaniel J. Smith - Trio: Async concurrency for mere mortals - PyCon 2018](https://www.youtube.com/watch?v=oLkfnc_UMcE\u0026t=76s) -\u003e Structured concurrency with trio.\n\n* [Kavya Joshi - A tale of concurrency through creativity in Python: A deep dive into how gevent works](https://www.youtube.com/watch?v=GunMToxbE0E) -\u003e Implicit cooperative multitasking via Gevent.\n\n* [Understanding the Python GIL](https://www.youtube.com/watch?v=Obt-vMVdM8s\u0026t=33s) -\u003e David Beazly explains the behavior of threads in Python why it yields concurrency rather than parallelism.\n\n* [The other async (threads + async = ❤️)](https://www.youtube.com/watch?v=x1ndXuw7S0s) -\u003e David Beazley builds a thread and async compatible queue from scratch.\n\n* [Łukasz Langa – Thinking in coroutines](https://www.youtube.com/watch?v=cvwrkOnn9xo) -\u003e Understanding event loop, task cancellation, and exception handling in Asyncio.\n\n## Podcasts\n\n* [John Reese - Asyncio all the things with Omnilib](https://talkpython.fm/episodes/show/304/asyncio-all-the-things-with-omnilib) -\u003e Making the fundamental toolsets async in Python.\n\n* [David Beazley - Python concurrency with Curio](https://talkpython.fm/episodes/show/107/python-concurrency-with-curio) -\u003e David Beazley explains the problems with Asyncio and how he built Curio by reasoning from the first principle.\n\n* [Nathaniel Smith - Simplifying Python's async with Trio](https://talkpython.fm/episodes/show/167/simplifying-pythons-async-with-trio) -\u003e Nathaniel Smith talks about why cancellation and exception handling can be difficult in background tasks, and how Trio attempts to solve that.\n\n* [Lukasz Langa - AsyncIO + music, origins of Black, and managing Python releases](https://realpython.com/podcasts/rpp/7/) -\u003e Lukasz Langa talks about analog synthesizers, AsyncIO and the Black code formatter.\n\n## Banters\n\n* [I don't understand asyncio](https://lucumr.pocoo.org/2016/10/30/i-dont-understand-asyncio/) -\u003e Armin Ronacher complains about baffling complexities in the design decisions of the asyncio module.\n\n* [Hackernews discourse - I don't understand asyncio](https://news.ycombinator.com/item?id=12829759) -\u003e People Complaining About the Design Decisions behind the Asyncio API.\n\n* [Reddit discourse - I don't understand asyncio](https://www.reddit.com/r/Python/comments/5a6gmv/i_dont_understand_pythons_asyncio_armin_ronachers/) -\u003e Armin Ronacher's conversation with a Python core developer.\n\n* [I'm not feeling the async pressure](https://lucumr.pocoo.org/2020/1/1/async-pressure/) -\u003e Armin Ronacher points out how Asyncio API overlooks the complexities imposed by backpressure.\n\n* [Hackernews discourse - I'm not feeling the async pressure](https://news.ycombinator.com/item?id=21927427) -\u003e Discussion on whether language implementation should deal with backpressure or not.\n\n* [Hackernews discourse - People comparing Python's coroutine driven concurrency with Golang's actor pattern](https://news.ycombinator.com/item?id=23289563) -\u003e People seems to hate asyncio's Twisted inspired design philosophy in general.\n\n* [Hackernews discourse - The bare minimum asyncio](https://news.ycombinator.com/item?id=17714304) -\u003e One Guy's attempt to cover the entire high-level API surface of asyncio in a single Hackernews comment.\n\n## Reactive programming \u0026 microservices\n\n* [Redis Streams Featuring Salvatore Sanfilippo - Redis Labs](https://www.youtube.com/watch?v=qXEyuUxQXZM) -\u003e Introduction to the Redis streams data structure and how can it be used as a safer alternative to Pub-Sub.\n\n\n## Python enhancement proposals (PEPs)\n\n* [PEP 255 -- Simple generators](https://www.python.org/dev/peps/pep-0255/)\n* [PEP 342 -- Coroutines via enhanced generators](https://www.python.org/dev/peps/pep-0342/)\n* [PEP 380 -- Syntax for delegating to a subgenerator](https://www.python.org/dev/peps/pep-0380/)\n* [PEP 3156 -- Asynchronous i/o support rebooted: the \"asyncio\" module](https://www.python.org/dev/peps/pep-3156/)\n* [PEP 492 -- Coroutines with async and await syntax](https://www.python.org/dev/peps/pep-0492/)\n* [PEP 654 -- Exception groups and except*](https://www.python.org/dev/peps/pep-0654/)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frednafi%2Fthink-async","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frednafi%2Fthink-async","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frednafi%2Fthink-async/lists"}