One of the things I love most about Python is that it doesn't box you in. With the same language, and often with the same script as a starting point, you can ship an API, analyze millions of rows, train an artificial intelligence model or configure a hundred routers at once.
In this second part I show you the big worlds where Python takes center stage and the libraries you'll hear about again and again. They all rest on the same things you learn in Python for Everyone: types, functions, modules, objects and files.
How is Python used on the web?
On the server side, Python is one of the most productive options out there:
- Django: the «batteries included» framework. It comes with authentication, an admin panel, an ORM for the database and protection against the most common attacks. It's what Instagram is built on.
- Flask: a microframework, ideal for small services and for learning how HTTP works under the hood.
- FastAPI: the favorite for modern APIs. It uses Python's type annotations to validate data and generate documentation automatically.
from fastapi import FastAPI
app = FastAPI()
@app.get("/hello/{name}")
def greet(name: str):
return {"message": f"Hello, {name}"}With six lines you have an API that responds in JSON, plus interactive documentation at /docs.
Why is Python the language of artificial intelligence?
Almost the entire AI ecosystem is programmed in Python, even though the heavy lifting underneath is done by C, C++ or CUDA on the GPU. Python is the layer that ties the pieces together:
- PyTorch (backed by Meta and now under the Linux Foundation) and TensorFlow (Google) for training neural networks.
- scikit-learn for classic machine learning: regression, classification and clustering.
- Hugging Face Transformers for using and fine-tuning language models.
- The official SDKs from OpenAI, Anthropic and Google for building agents and LLM applications.

What does Python do with data?
Python became the standard for data analysis thanks to a handful of libraries:
- NumPy: numerical computing with efficient arrays; it's the foundation of almost everything else.
- pandas and Polars: data tables (DataFrames) for cleaning, joining, filtering and summarizing information.
- Matplotlib and Plotly: charts, from a static report to an interactive dashboard.
- Jupyter: notebooks where you mix code, results and explanation. It's the data scientist's lab.
import pandas as pd
sales = pd.read_csv("sales.csv")
print(sales.groupby("country")["total"].sum().sort_values(ascending=False))
How does Python help with networking and automation?
Here's the reason Python for Everyone lives in the Network Programmability learning path. Network engineers no longer configure devices one by one: they write scripts that do it for them.
- Netmiko: connects over SSH to routers and switches from Cisco, Juniper, Arista and other vendors to send commands and read the output.
- NAPALM and Nornir: a common API across vendors and parallel execution across hundreds of devices.
- Ansible: the most widely used infrastructure automation tool is written in Python.
- pyATS: Cisco's network testing framework, for verifying that the network does what you expect.
- Scapy: for building and dissecting packets by hand, ideal for learning protocols.
from netmiko import ConnectHandler
router = {"device_type": "cisco_ios", "host": "10.0.0.1",
"username": "admin", "password": "********"}
with ConnectHandler(**router) as connection:
print(connection.send_command("show ip interface brief"))
And in the cloud and DevOps?
In the cloud, Python is the glue language. boto3 is the AWS SDK for Python; Azure and Google Cloud have their own. Many serverless functions, such as AWS Lambda, are written in Python, and so are a good share of the deployment, monitoring and testing scripts that DevOps teams rely on.
What you take away
- On the web: Django, Flask and FastAPI cover everything from a full site to a modern API.
- In AI: PyTorch, TensorFlow, scikit-learn and the LLM SDKs all speak Python.
- In data: NumPy, pandas, Polars and Jupyter are the standard for analysis.
- In networking: Netmiko, NAPALM, Nornir, Ansible and pyATS automate infrastructure.
In the next part: Python as a programming language, with its strengths, its limits and its main uses.
Learn the foundation all these worlds share
Before you choose between web, AI, data or networking, you need to master the language. The Python for Everyone course takes you from your first program all the way to sockets, the web, databases and testing, with Python 3.14 and examples designed for automation.
Sources
- Django documentationdjangoproject.com
- FastAPIfastapi.tiangolo.com
- PyTorchpytorch.org
- pandas documentationpandas.pydata.org
- Netmikogithub.com
- Ansible documentationdocs.ansible.com
Photos from Unsplash, with each author’s name in the caption. Text by Jesús Espinoza, prepared with AI assistance and reviewed by him.
