What it is
Python is a general-purpose, interpreted programming language created by Guido van Rossum and first released in 1991. It is known for readable code that uses indentation to mark blocks, and for a large standard library that covers files, JSON, HTTP, CSV and much more without extra installs. The reference implementation is CPython, and the language is developed in the open under the Python Software Foundation.
It is used almost everywhere: scripting and automation, web back ends, data work, machine learning, and hardware. On a Raspberry Pi, Python is the usual way to read sensors and drive pins, with libraries for GPIO and common buses. The AWS SDK for Python, boto3, makes it a common choice for scripts that talk to AWS services.
How I use it
- The build scripts for mervinc.com are Python: page generators, a Content Security Policy check and a corpus build.
- Seeding scripts for the family tree demo, which fill it with a fictional family.
- Ops scripts for routine jobs on the servers I run.
- Robots on a Raspberry Pi, programmed in Python against the hardware: GPIO, motors and sensors.
Python is the right tool when I need a script that is quick to write, easy to read later and has the libraries already there. My production apps are mostly PHP and TypeScript, so Python fills the gaps around them: generating pages, checking a build, seeding a demo, or running a small job on a server. On a Pi it is the shortest path from an idea to a motor turning.
Questions
Do you write Python?
Yes. The build tooling for this site is Python, including the page generators and a Content Security Policy check. I also use it for ops scripts, demo data seeding and Raspberry Pi robots.
Is Python your main language for apps?
No. My production apps are mostly PHP on the server and TypeScript with React and React Native on the front. Python is what I reach for around them, for scripts, tooling and hardware.