- Blocking unsafe resources in HTML email using BeautifulSoup
- Python Multiprocessing graceful shutdown in the proper order
- FastAPI + SQLAlchemy: Asynchronous IO and Back Pressure
- Connect two Docker containers having their own Docker Compose files
- Using Locust to load test a FastAPI app with concurrent users
- Documenting a Flask RESTful API with OpenAPI (Swagger) using APISpec
- Using UUIDs instead of Integer Autoincrement Primary Keys with SQLAlchemy and MariaDb
- SLQAlchemy dynamic query building and filtering including soft deletes
- SQLAlchemy server-side datetime calculations
- Adding url_for() links to Jinja templates of a Flask multilanguage website
- Threaded comments using Common Table Expressions (CTE) for a MySQL Flask blog or CMS
- Python Flask app on Docker in ISPConfig3 with Nginx - Part 1: Minimal app
17 June 2019 0
Disclaimer: This my first SQLAlchemy project so I am not experienced and may make wrong statements in this post. While working on my first Flask / SQLAchemy project (I do not use Flask-SQLAlchemy) I hit a very high and thick wall. To explain this, consider you have a blog with posts and tags. There is a many-to-many relationship between posts and tags: a post can have many tags and a tag can have ...
1 June 2019 0
For this blog I wanted the blog post page to have three 'columns'. Why did I quote the word columns? Because what is a column on a large screen can be a row on a mobile device. Bootstrap uses containers, rows and columns. And of course, a Bootstrap column can show on the screen as a column or a row. Help! When designing a layout we must not think about columns but about screen elements and how we ...
10 March 2019 0
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 0
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 ...