- Connect to a service on a Docker host from a Docker container
- AIOHTTP: Detecting DNS timeout with custom nameservers
- Flask Message Flashing: Replace Bootstrap Alerts by Toasts
- SQLAlchemy: Using Cascade Deletes to delete related objects
- SQLAlchemy PostgreSQL: Add a second BigInteger Primary Key
- Redirect on an exception in Flask using a decorator
- Flask SQLAlchemy CRUD application with WTForms QuerySelectField and QuerySelectMultipleField
- Using Python's pyOpenSSL to verify SSL certificates downloaded from a host
- Using UUIDs instead of Integer Autoincrement Primary Keys with SQLAlchemy and MariaDb
- Flask RESTful API request parameter validation with Marshmallow schemas
- Documenting a Flask RESTful API with OpenAPI (Swagger) using APISpec
- SLQAlchemy dynamic query building and filtering including soft deletes
10 March 2019 1
When using docker we want the size of the docker image to be minimal. Why? Many reasons. Memory footprint is one especially when running many Python Flask websites on an ISPConfig3 server. Fortunately, from docker 17.05 we can use multistage builds. Using this we reduce our image size from 376MB to 211MB! Below are two images we can use: > docker images python 3.6-alpine 1837080c5e87 5 ...
9 March 2019 1
By default Alembic does not change the length of string fields, I noticed this after changing a string field from: description = Column(String(150), server_default='') to: description = Column(String(250), server_default='') No changes were made. It appears that column type change detection is off by default, so you can test it first, and can be turned on by adding 'compare_type=True' to the context. ...
13 February 2019 0
This is a post showing how to run a Flask app on ISPConfig3. Why? I have a VPS on the internet running Debian and ISPConfig3. It is running static sites and PHP sites. But now I also want to run my Flask python apps here. This way I can use the domain management I am used to and do not need an extra server for Python apps. This solution uses Docker to run the Flask app, printing 'Hello world', and ...