Dataslope logoDataslope

Next Steps

Where to go after you have the basics down

You now know enough Python to write real programs: variables and collections, control flow, functions and modules, files, classes, and the iterator/generator/decorator trio that powers a lot of idiomatic code. That's a solid foundation. Here's a map of the next layer.

You are ready

After this course, you can read most Python codebases, contribute to open-source projects, build CLI tools, automate tasks, write tests, and start learning frameworks. The fundamentals you've learned here will serve you for years. Now it's time to specialize.

Topics worth learning next

Type hints and static type checkers

Type hints are optional but increasingly standard in professional Python. They catch bugs before runtime and make your code self-documenting.

Code Block
Python 3.13.2

Run a checker like mypy or pyright over your code to catch type mismatches:

pip install mypy
mypy myfile.py

Modern typing features

Python 3.9+ added `list[int]` instead of `List[int]`, 3.10 added `X | Y` union syntax, and 3.12 added PEP 695 generic syntax. Type hints keep evolving. Worth exploring: `typing.Protocol`, `typing.TypedDict`, `Generic`, `Literal`, `Final`, and structural subtyping.

Testing with pytest

Built-in unittest works, but most Python projects use pytest for its friendlier API, fixtures, parameterization, and rich plugin ecosystem.

Code Block
Python 3.13.2

Run with:

pip install pytest
pytest

pytest auto-discovers files named test_*.py and runs all functions named test_*.

Async programming with asyncio

async def, await, and the asyncio library let one thread juggle thousands of network connections. Essential for web servers, scrapers, and anything I/O-bound.

Code Block
Python 3.13.2

await asyncio.gather() runs the three fetch calls concurrently, so the total time is ~0.1s, not 0.3s. This pattern scales to thousands of requests.

Async vs threads vs processes

  • Threads (`threading`): Good for I/O-bound concurrency where the GIL (Global Interpreter Lock) is fine. Simple but limited.
  • Processes (`multiprocessing`, `concurrent.futures`): For CPU-bound work. Each process has its own Python interpreter and memory.
  • Async (`asyncio`): For high-concurrency I/O. One thread, thousands of tasks. Lowest overhead, highest scalability for network-bound work.
  • Free-threaded Python (PEP 703): Python 3.13+ offers an experimental build without the GIL, enabling true multi-threaded parallelism. This is a space to watch as it matures.

Web frameworks

Python dominates backend web development. The big three:

  • FastAPI — Modern, typed HTTP APIs with automatic OpenAPI docs. Uses async under the hood. The current favorite for new API projects.
  • Flask — Tiny, minimal, flexible. Great for small services and learning.
  • Django — Full-stack framework with batteries included: ORM, admin panel, auth, forms, migrations. Powers Instagram, Spotify, and countless others.
# FastAPI example (install with: pip install fastapi uvicorn)
from fastapi import FastAPI

app = FastAPI()


@app.get("/")
def read_root():
    return {"message": "Hello, world!"}


@app.get("/items/{item_id}")
def read_item(item_id: int, q: str = None):
    return {"item_id": item_id, "q": q}


# Run with: uvicorn main:app --reload

Data science and machine learning

Python's killer app. The ecosystem is massive:

Code Block
Python 3.13.2

Python owns data

If you work with data — analysis, visualization, modeling, ETL pipelines — Python is the lingua franca. pandas, NumPy, and scikit-learn are the most-used libraries on PyPI. Learning them opens doors to data science, ML engineering, and analytics roles.

Automation and scripting

Python excels at gluing systems together:

# Example: fetch JSON from an API
import requests

response = requests.get("https://api.github.com/users/github")
data = response.json()
print(f"GitHub user: {data['login']}")
print(f"Public repos: {data['public_repos']}")

Packaging and distribution

If you want to share your code or publish a library:

  1. Write a pyproject.toml (see the Virtual Environments page).
  2. Build a wheel: python -m build (requires pip install build).
  3. Publish to PyPI: twine upload dist/* (requires pip install twine).

For self-contained executables (to share with non-Python users), look at:

  • PyInstaller — Bundles Python + your code + dependencies into a single executable.
  • shiv / pex — Python-based executable zip archives.

uv makes publishing easy

`uv` (from Astral) supports `uv publish` to push packages to PyPI in one command. As the Python tooling ecosystem modernizes, workflows that used to require multiple tools are converging into single, fast commands.

Tooling worth installing once

Modern Python projects use a suite of automated tools to enforce code quality:

  • ruff — Linting, import sorting, and (as of 2024) formatting. Replaces flake8, isort, black, and more. Rust-based, instant.
  • mypy / pyright — Static type checking.
  • pre-commit — Runs linters/formatters automatically before every commit.
  • uv — Replaces pip, pip-tools, and venv with one fast Rust binary.

Example .pre-commit-config.yaml:

repos:
  - repo: https://github.com/astral-sh/ruff-pre-commit
    rev: v0.1.8
    hooks:
      - id: ruff
        args: [--fix, --exit-non-zero-on-fix]
      - id: ruff-format

Install once:

pip install pre-commit
pre-commit install

Now every git commit auto-runs ruff. Code stays clean without thinking about it.

Concurrency models compared

ModelBest forExample
Async (asyncio)High-concurrency I/O (web servers, scrapers, APIs)async def + await
Threads (threading)Modest I/O concurrency where GIL is finethreading.Thread
Processes (multiprocessing)CPU-bound work (data crunching, image processing)multiprocessing.Pool
Free-threaded (PEP 703)CPU-bound parallelism without GIL (experimental in 3.13+)python -X gil=0

Further reading

ResourceWhy
docs.python.orgThe reference. Read the Library Reference in particular.
Real PythonHigh-quality tutorials on most topics.
PEP indexWhere new language features are designed. Skim PEPs 8 (style), 20 (Zen of Python), 257 (docstrings), 484 (type hints), 621 (pyproject.toml).
Fluent Python by Luciano RamalhoThe book that takes you from "I know Python" to "I really know Python". Covers iterators, descriptors, metaclasses, async, and more.
Effective Python by Brett Slatkin90 specific ways to write better Python. Great for intermediate learners.

Practice ideas

If you want to cement what you've learned, try building:

  1. A CLI tool: Parse arguments with argparse or click, read a config from YAML/TOML (pyyaml, tomli), print colored output with rich.
  2. A small HTTP API: Use FastAPI to define a few endpoints, validate input with pydantic, write tests with pytest.
  3. A data pipeline: Read CSVs into pandas, clean them, aggregate, and write the result to SQLite or DuckDB.
  4. A web scraper: Use requests and BeautifulSoup to extract data from a website, then store it in a database or CSV.
  5. A library you publish to PyPI: Write tests, set up pyproject.toml, push to GitHub with a CI workflow (GitHub Actions), and publish with twine or uv publish.

Build to learn

The fastest way to internalize Python is to build something that matters to you. Pick a small, concrete project — a tool you'd actually use — and build it. You'll learn more from one real project than from ten tutorials.

Roadmap by interest

Depending on where you want to go:

  • Web backend: FastAPI + SQLAlchemy + pytest + Docker.
  • Data analysis: pandas + Jupyter + Matplotlib + SQL.
  • Machine learning: NumPy + pandas + scikit-learn → PyTorch or TensorFlow.
  • Automation: requests + BeautifulSoup + schedule + Click.
  • DevOps/tooling: subprocess + pathlib + Click + Docker + CI/CD.
  • Scientific computing: NumPy + SciPy + Matplotlib + Jupyter.

One last multiple-choice question

QuestionSelect one

Which of these statements about what you've learned is most accurate?

You now know everything there is to know about Python.

You have a solid foundation — core syntax, collections, functions, classes, generators, decorators — and you're ready to start building real projects.

You should keep reading tutorials before writing any real code.

The standard library and PyPI are too unstable to rely on for production work.

Keep going

You've finished Python Basics. The next step is to pick a direction — web, data, ML, automation, whatever excites you — and start building. The fundamentals you've learned here will serve you everywhere. Good luck, and happy hacking.

Thank you for reading. Whatever you build next, make it count.

On this page