Python: what we build with it and why
Python is our language for Discord bots, ops scripts, monitoring and data sync: wherever writing quickly and fixing easily matter most.
Python in real screenshots
The projects on this page on the screens from the portfolio and the case studies, each with a short description and the way to the full one.
When Python, and when something else
A technology has to fit the place the code will run and the team that will take it over. The final choice is made in the quote, together with you.
We pick Python
Discord bots
The VulCode bot runs on discord.py and aiohttp, and takes page screenshots and checks through Playwright. A new command is added and deployed with no build.
Ops scripts
Infrastructure diagnostics and housekeeping are Python scripts. The interpreter is on every Linux box, so a script runs as soon as it is copied to a server.
Monitoring with alerts
The FastAPI monitoring checks services and sends alerts to Discord. FastAPI describes the API with types, and the documentation comes straight from them.
Services with no dependencies
webhook-proxy gathers Discord webhooks under one address and keeps a separate queue for each, so a clogged alerts channel does not block payment notices. It runs on the standard library alone, with no pip.
Sync between services
Entries from Discord reach the DualFroz site through a short sync script. Code that joins two APIs is quickest to write and fix in Python.
Tasks handled on Discord
mailcheck handles accounts from inside Discord, with a blocklist and stats. The team deals with small matters in the chat, with no separate panel.
We pick something else
A browser interface
We write panels and sites in TypeScript and React. Python can serve the API for such a panel, but we do not build its screens in Python.
A service with very heavy traffic
By default CPython runs Python code on one core at a time because of the GIL. We write a service that must handle heavy traffic on a small machine in Go.
A program installed at the client's
A program on someone else's machine should not need the right Python version and packages. Go and Rust give one binary that simply runs.
A core with money
Python type hints are not checked at run time, so a wrong type slips through until the code runs. We keep billing code in Rust, where such a mistake does not compile.
A bot for a JavaScript team
The Aphrodi bots are in JavaScript and TypeScript with discord.js, because the team developing them knows that ecosystem. We choose a bot's language for the people who will change it.
A phone or desktop app
For phones we write in Kotlin and Swift, for desktops in C# with Avalonia or Rust with Tauri. Python offers neither a native interface nor simple distribution there.
Python compared, point by point
Each need on a row of its own, with what each of the two columns gives you on it side by side.
Discord bot
A server script
A browser panel
A monitoring API
Syncing two APIs
A service for heavy traffic
A program installed at the client's
Python in all our code
How many lines we have written in Python, and what part of everything we have written that is. We count the lines added in the commits of our repositories, language by language.
The libraries these projects stand on
From the dependency files of our repositories. With each, one sentence on what we use it for.
discord.py
Discord bots.
aiohttp
HTTP requests in bots.
FastAPI and uvicorn
The monitoring API.
Playwright
Page screenshots and checks from a bot.
Our changes to other people's Python projects
6 merged changes in 5 repositories. The maintainers of these projects reviewed our code and merged it into theirs.
Week by week
The languages of our changes
- Python6 4.8%
- Go33 26%
- PHP32 26%
- JavaScript25 20%
- C#11 8.8%
- Rust10 8.0%
- Perl i JavaScript6 4.8%
- TypeScript2 1.6%
- pydantic-extra-typesExtra types for data validation in Pydantic, the popular Python library.2 merged changes338 stars on GitHub
- funcyA collection of practical functional tools for Python.1 merged change3,510 stars on GitHub
- python-benedictA Python dict subclass with key path access and built-in I/O for many formats.1 merged change1,606 stars on GitHub
- pydashA Python utility library modelled on Lo-Dash.1 merged change1,447 stars on GitHub
- pytimeparseA small Python module for parsing time expressions such as 1h30m.1 merged change299 stars on GitHub
Other technologies, and where their code runs
Each has its own page with projects on real screens and a comparison with the alternatives.
Questions about Python
Answers about Python, our projects and the numbers on this page.
Read next
Write-ups of the projects on this page and an overview of every technology.
A project in Python?
Describe what you want to build. We reply within an hour and tell you plainly whether this technology is a good choice.
