Shweta Palande

Devouring APIs with Python

Your Python API calls could be 10x faster. Learn to switch from synchronous requests to a truly non-blocking asynchronous library.

Devouring APIs with Python
#1about 2 minutes

Understanding the role of an application programming interface (API)

An API acts as a communication layer that allows different software applications, like a taxi app and Google Maps, to exchange data and functionality.

#2about 4 minutes

Deconstructing the components of a REST API URL

A REST API URL is broken down into the protocol, server host, resource path, and optional parameters for filtering data.

#3about 1 minute

Distinguishing between client libraries and API frameworks

Client libraries like `requests` are used to send HTTP requests to endpoints, while API frameworks like `Flask` provide tools to build your own API endpoints.

#4about 5 minutes

Making synchronous requests with the Python requests library

The `requests` library simplifies making HTTP GET and POST requests in Python with a clean, one-line syntax.

#5about 6 minutes

Using the pycurl library as a libcurl wrapper

The `pycurl` library provides a Python interface to `libcurl` for making API calls, offering more control but with a more complex syntax than `requests`.

#6about 5 minutes

Building a simple API with the Flask microframework

Flask allows developers to quickly define API routes and handle different HTTP methods using decorators on Python functions.

#7about 3 minutes

Structuring APIs with the Flask-RESTful extension

The Flask-RESTful extension adds a layer of abstraction for building REST APIs by organizing endpoints into resources, leading to cleaner code.

#8about 8 minutes

Demonstrating synchronous API calls with a live coding example

A synchronous script using the `requests` library fetches 100 URLs sequentially, highlighting the performance bottleneck of waiting for each request to complete.

#9about 3 minutes

Explaining multiprocessing and multithreading with analogies

Multiprocessing achieves true parallelism with multiple CPUs, while multithreading creates the illusion of parallelism on a single CPU, constrained by Python's GIL.

#10about 13 minutes

Achieving high performance with asyncio and aiohttp

Using `asyncio` with the `aiohttp` library enables non-blocking API calls, drastically reducing execution time by performing other tasks while waiting for I/O.

#11about 1 minute

Exploring resources for further API development learning

Cisco DevNet offers learning labs, code samples, and automation exchanges to help developers expand their Python and REST API skills.

#12about 7 minutes

Q&A on concurrency models and developer tools

The discussion covers when to choose different concurrency models, favorite VS Code plugins like Tabnine and Acrolinx, and best practices for error handling.

Related jobs
Jobs that call for the skills explored in this talk.

Featured Partners

Related Articles

View all articles
DC
Daniel Cranney
The State of WebDev AI 2025 Results: What Can We Learn?
Introduction The 2025 edition of The State of WebDev AI offers a detailed snapshot of how developers are using AI today, which tools have gained the most traction over the past year, and what these trends suggest about the future of the industry. In...
The State of WebDev AI 2025 Results: What Can We Learn?
CH
Chris Heilmann
With AIs wide open - WeAreDevelopers at All Things Open 2025
Last week our VP of Developer Relations, Chris Heilmann, flew to Raleigh, North Carolina to present at All Things Open . An excellent event he had spoken at a few times in the past and this being the “Lucky 13” edition, he didn’t hesitate to come and...
With AIs wide open - WeAreDevelopers at All Things Open 2025
CH
Chris Heilmann
WeAreDevelopers LIVE days are changing - get ready to take part
Starting with this week's Web Dev Day edition of WeAreDevelopers LIVE Days, we changed the the way we run these online conferences. The main differences are:Shorter talks (half an hour tops)More interaction in Q&AA tips and tricks "Did you know" sect...
WeAreDevelopers LIVE days are changing - get ready to take part

From learning to earning

Jobs that call for the skills explored in this talk.

Python Developer

Python Developer

LiveLink
Havant, United Kingdom

Remote
C++
GIT
Linux
NumPy
+3
Python Developer

Python Developer

Shakers
Municipality of Valencia, Spain

Intermediate
API
gRPC
Python
Docker
FastAPI
+5
Python Developer

Python Developer

Shakers
Municipality of Bilbao, Spain

Intermediate
API
gRPC
Python
Docker
FastAPI
+5
Python Developer

Python Developer

Shakers
Municipality of Vitoria-Gasteiz, Spain

Intermediate
API
gRPC
Python
Docker
FastAPI
+5
Python Developer

Python Developer

Shakers
Retortillo de Soria, Spain

Senior
API
gRPC
Python
Docker
FastAPI
+5
API Developer

API Developer

Spait Infotech Private Limited
Birmingham, United Kingdom

Remote
£25-70K
Junior
API
XML
GIT
+19