Run Black Python formatter in Docker.
This image is available on Dockerhub.
Here is a short article I wrote about setting this up. But in short:
docker run -d -p 45484:45484 --name blackd ceeveeya/blackd:latest
Add BlackConnect plugin and set config as on the screenshot below.
Now your code should be formatted every time you save it!