SlideShare a Scribd company logo
EuroPython 2015, Bilbao
Victor Stinner
vstinner@redhat.com
Distributed under CC BY-SA license: http://creativecommons.org/licenses/by-sa/3.0/
Asyncio community
one year later
Python core developer since 5 years
Senior Software Engineer at Red Hat
Port OpenStack to Python 3
Working remotely from South of
France
Victor Stinner
Python 3.4.0: March 2014
Bare: almost no library
Asyncio launch
python-tulip mailing list (Google Group)
#asyncio IRC channel on Freenode
https://github.com/python/asyncio
Python bug tracker (bugs.python.org)
More and more conferences!
Community
Most famous and successful library
HTTP client and server
HTTPS
Client and server Websocket
https://aiohttp.rtfd.org/
aiohttp
@asyncio.coroutine
def fetch_page(url):
req = yield from aiohttp.request('GET', url)
assert req.status == 200
return (yield from req.read())
aiohttp client example
MySQL: aiomysql
PostgreSQL: aiopg (based on
psycopg2)
SQL drivers
dsn = 'dbname=aiopg host=127.0.0.1 user=…'
@asyncio.coroutine
def go():
pool = yield from aiopg.create_pool(dsn)
with (yield from pool.cursor()) as cur:
yield from cur.execute("SELECT 1")
row = yield from cur.fetchone()
assert row == (1,)
aiopg example
peewee: peewee-async
SQLAlchemy: aiopg.sa
ORM
memcached: aiomemcache
redis: aioredis
redis: asyncio-redis
Key-value stores
@asyncio.coroutine
def wait_each_command():
foo = yield from redis.get('foo')
bar = yield from redis.incr('bar')
return foo, bar
aioredis example
@asyncio.coroutine
def pipelined():
get = redis.get('foo')
incr = redis.incr('bar')
foo, bar = yield from asyncio.gather(get,
incr)
return foo, bar
aioredis pipeline example
CouchDB: aiocouchdb
MongoDB: asyncio-mongodb
NoSQL
DNS: aiodns (async resolver)
IRC: bottom
IRC: irc3
SSH: AsyncSSH
XMPP (Jabber): slixmpp
Clients
AMI: panoramisk (AMI and FastAGI)
AMQP: aioamqp
ElasticSearch: aioes
Etcd: aioetcd
Google Hangouts: hangups
More clients
aiopyramid
aiowsgi
interest
Muffin
API hour
Web frameworks
nacho
Pulsar
rainfall
Vase
aiohttp.web
AutobahnPython
websockets
WebSocket-for-Python
Websockets
FastAGI (Asterisk): panoramisk
IRC: irc3.irc3d
HTTP: aiohttp
SSH: AsyncSSH
Servers
@asyncio.coroutine
def hello(request):
return web.Response(body=b"Hello, world")
app = web.Application()
app.router.add_route('GET', '/', hello)
aiohttp server
@asyncio.coroutine
def stats(request):
body = yield from get_stats()
return web.Response(body=body)
app.router.add_route('GET', '/stats', stats)
aiohttp server
asynctest: for unittest
pytest-asyncio: for pytest
aiotest (test asyncio implementation)
Unit tests
Trollius is the Python 2 port of asyncio
Work on Python 2.6 – 3.5
Use “yield From(...)”
instead of “yield from ...”
Only a few asyncio libraries are
compatible with trollius
Only use it if you cannot port your
application to Python 3
Trollius
Ludovic Gasc ran benchmark on Flask,
Django and API Hour (asyncio)
API Hour is as fast or much faster
Best case: API-Hour handles 5x more
requests per second
JSON serialization: 400k req/s API-
Hour vs 70-79k for Django-Flask
Details: http://blog.gmludo.eu/
Benchmarks
Need tutorials and more
documentation
Port more stdlib modules to asyncio:
ftplib, poplib, imaplib, nntplib, smtplib,
telnetlib, xmlrpclib, etc.
Interoperability with Twisted
How can you help?
Questions?
http://www.asyncio.org/
github.com/python/asyncio/wiki/ThirdParty
Distributed under CC BY-SA license: http://creativecommons.org/licenses/by-sa/3.0/
Contact :
vstinner@gmail.com

More Related Content

PDF
aiohttp intro
PDF
What Is Async, How Does It Work, And When Should I Use It?
PDF
HOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOP
PDF
BUILDING APPS WITH ASYNCIO
PPTX
Debugging & profiling node.js
PPTX
Asynchronous Task Queues with Celery
ODP
Ansible basics workshop
KEY
Node.js
aiohttp intro
What Is Async, How Does It Work, And When Should I Use It?
HOW TO DEAL WITH BLOCKING CODE WITHIN ASYNCIO EVENT LOOP
BUILDING APPS WITH ASYNCIO
Debugging & profiling node.js
Asynchronous Task Queues with Celery
Ansible basics workshop
Node.js

What's hot (20)

PDF
Ansible is the simplest way to automate. MoldCamp, 2015
PDF
Ansible Crash Course
PDF
Introducing Ansible
PDF
Infrastructure = Code
PDF
Jenkins and ansible reference
PDF
IT Automation with Ansible
KEY
fog or: How I Learned to Stop Worrying and Love the Cloud
PPTX
Using Ansible Dynamic Inventory with Amazon EC2
PDF
Socket.IO
PDF
#OktoCampus - Workshop : An introduction to Ansible
PDF
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
PPTX
CI/CD for android
PDF
Introduction to Ansible (Pycon7 2016)
PDF
A quick intro to Ansible
PDF
How to install a personal condor
PPTX
nginx + uwsgi emperor + bottle
PDF
Fabric workshop(1) - (MOSG)
PDF
Network Automation with Ansible
PDF
Flask With Server-Sent Event
PDF
Ansible Introduction - Ansible Brno #1 - David Karban
Ansible is the simplest way to automate. MoldCamp, 2015
Ansible Crash Course
Introducing Ansible
Infrastructure = Code
Jenkins and ansible reference
IT Automation with Ansible
fog or: How I Learned to Stop Worrying and Love the Cloud
Using Ansible Dynamic Inventory with Amazon EC2
Socket.IO
#OktoCampus - Workshop : An introduction to Ansible
Cloud meets Fog & Puppet A Story of Version Controlled Infrastructure
CI/CD for android
Introduction to Ansible (Pycon7 2016)
A quick intro to Ansible
How to install a personal condor
nginx + uwsgi emperor + bottle
Fabric workshop(1) - (MOSG)
Network Automation with Ansible
Flask With Server-Sent Event
Ansible Introduction - Ansible Brno #1 - David Karban
Ad

Similar to asyncio community, one year later (20)

PDF
Webscraping with asyncio
PPTX
Async programming and python
PDF
Python, do you even async?
PPT
AsyncIO To Speed Up Your Crawler
PPTX
Asynchronous programming with django
PDF
Realtime Apps with Django
PDF
Asynchronous Python and You
PDF
Introduction to Python Asyncio
PDF
Syncing up with Python’s asyncio for (micro) service development, Joir-dan Gumbs
PDF
Tornado in Depth
PDF
Introduction to asyncio
PDF
Python for IoT, A return of experience
PDF
Using Python for IoT: a return of experience, Alexandre Abadie
PDF
asyncio stack for web-development
PDF
The journey of asyncio adoption in instagram
PPTX
Web backends development using Python
PDF
Programação Assíncrona com Asyncio
PDF
Async Web Frameworks in Python
PDF
A deep dive into PEP-3156 and the new asyncio module
PDF
AsyncIO in Python (Guide and Example).pdf
Webscraping with asyncio
Async programming and python
Python, do you even async?
AsyncIO To Speed Up Your Crawler
Asynchronous programming with django
Realtime Apps with Django
Asynchronous Python and You
Introduction to Python Asyncio
Syncing up with Python’s asyncio for (micro) service development, Joir-dan Gumbs
Tornado in Depth
Introduction to asyncio
Python for IoT, A return of experience
Using Python for IoT: a return of experience, Alexandre Abadie
asyncio stack for web-development
The journey of asyncio adoption in instagram
Web backends development using Python
Programação Assíncrona com Asyncio
Async Web Frameworks in Python
A deep dive into PEP-3156 and the new asyncio module
AsyncIO in Python (Guide and Example).pdf
Ad

Recently uploaded (20)

PPTX
20250228 LYD VKU AI Blended-Learning.pptx
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
MIND Revenue Release Quarter 2 2025 Press Release
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Spectroscopy.pptx food analysis technology
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Network Security Unit 5.pdf for BCA BBA.
PDF
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPT
Teaching material agriculture food technology
PDF
KodekX | Application Modernization Development
PDF
Electronic commerce courselecture one. Pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Programs and apps: productivity, graphics, security and other tools
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
20250228 LYD VKU AI Blended-Learning.pptx
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
MIND Revenue Release Quarter 2 2025 Press Release
The AUB Centre for AI in Media Proposal.docx
TokAI - TikTok AI Agent : The First AI Application That Analyzes 10,000+ Vira...
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Spectroscopy.pptx food analysis technology
Unlocking AI with Model Context Protocol (MCP)
Network Security Unit 5.pdf for BCA BBA.
How UI/UX Design Impacts User Retention in Mobile Apps.pdf
Digital-Transformation-Roadmap-for-Companies.pptx
Teaching material agriculture food technology
KodekX | Application Modernization Development
Electronic commerce courselecture one. Pdf
MYSQL Presentation for SQL database connectivity
Dropbox Q2 2025 Financial Results & Investor Presentation
Per capita expenditure prediction using model stacking based on satellite ima...
Programs and apps: productivity, graphics, security and other tools
Encapsulation_ Review paper, used for researhc scholars
Build a system with the filesystem maintained by OSTree @ COSCUP 2025

asyncio community, one year later