David Härer / Cheatsheets

Python Cheatsheet



How can I install a specific Python version on Ubuntu?

You can use the deadsnakes PPA or pyenv.

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update 
sudo apt install python3.10

How do I manage dependencies a packages?

I use Poetry with Poe the Poet.

How do I model and validate data?

I use Pydantic.

How do I analyze and model data?

I use Pandas.

How do I build REST APIs?

How do I build CLI apps?

I use Typer.

How do I make HTTP requests?

I use HTTPX.

How do I style and lint my code?

How do I test my code?

I use PyTest with pytest-mock.

How do I create slugs?

I use python-slugify.