Flask and SQLAlchemy: Connecting To MySQL (Python / Notes)

For my assets web app, written in Flask (Python) I have separated the app and the database into separate instances. This allows me to update the app and its dependencies without impacting the database and its dependencies, or vice-versa. The database could be one of many as I’m using SQLAlchemy to handle the connectivity between … Continue reading Flask and SQLAlchemy: Connecting To MySQL (Python / Notes)

AttributeError: ‘FlaskClientTestCase’ object has no attribute ‘app_context’ – Unit Testing (Python)

Less of blog post and more of a reminder to myself. When using Flask and Unit Testing with Python, if either of the below errors occur (or something similar): Then it may be because the setUp function of the test class has not set up correctly. Spent some time going round in circles until I … Continue reading AttributeError: ‘FlaskClientTestCase’ object has no attribute ‘app_context’ – Unit Testing (Python)

Installing / Using Flask or Raspberry Pi IoT Project: Temperature Part 4 (Raspberry Pi / Python)

Flask running and updating data

Now that the temperature sensor is taking readings and tweeting them I want to look at exporting the results another way, and what better way than a web page. I have created guides on using a Raspberry Pi as various different types of web server; see: Node.JS Apache / WordPress Django So today I am … Continue reading Installing / Using Flask or Raspberry Pi IoT Project: Temperature Part 4 (Raspberry Pi / Python)

Continuous Deployment, Continuous Delivery – The CD of CI/CD (GitHub / Python / DevOps)

In this blog post I take my Flask (Python) web application and deployment to Microsoft Azure, and instead of doing it manually I do it via a CI/CD. I’ve previously discussed Continuous Integration (CI) in blog posts around CI, GitHub actions and recently Code Coverage. The CD of CI/CD can stand for Continuous Deployment or … Continue reading Continuous Deployment, Continuous Delivery – The CD of CI/CD (GitHub / Python / DevOps)