Posted on 2024-10-26T20:42:31Z by Kevin Foong
After a bit of a hiatus I am now resuming this blog.
Currently learning Django and in particular going through this book -

Django is certainly a web framework with batteries included. I found many things that I was doing in Flask , Django already provides out-of-the-box. Still learning Flask first was a great experience because now I know how (most) things work from the ground up.
BTW I find that the Example book provides a similar experience in learning Django as Miguel Gringberg's Flask Mega Tutorial in learning Flask. Great book!
Tags:
django
Posted on 2020-12-30T06:49:00Z by Kevin Foong


Swagger is a great tool which enables us to document our API structure and allow others to test it out. Here I will provide an overview on how we can set up Swagger on a Flask API project.
We will use the Flask-Swagger-UI library. Note that this library provides Swagger via a blueprint so we will also need to be using blueprints in Flask (which this post will not go through).
Read more ...
Tags:
flask
API
swagger
Posted on 2020-12-29T11:20:11Z by Kevin Foong
I haven't seen many articles on the internet describing how to use Pydantic together with Flask so I thought of providing an overview of what I did to get this to work. For those who don't know, Pydantic is a Python library used to parse and validate data. It is typically used to ensure that data sent to your API enpoints is in the correct format and type.
- First we install a handy library Flask-Pydantic. This library is used to integrate Pydantic with Flask.
pip install Flask-Pydantic
- Next we create Pydantic schema models. These models define the required fields for the endpoint. A model is just a class that inherits from Pydantic's
BaseModel
. I normally have all models in a separate models_schema.py
file.
- Below is an excerpt from my
models_schema.py
file.
Some notes,
Read more ...
Tags:
flask
pydantic
API
Posted on 2020-09-04T02:54:05Z by Kevin Foong
In this blog post we will be exploring the Quasar QUploader component in order to upload photos and how to handle this in the backend via Flask. I assume you already have some basic knowledge about Vue, Quasar and some Flask.

Read more ...
Tags:
flask
quasar
Posted on 2020-08-30T05:16:57Z by Kevin Foong
Make sure you keep any sensitive information in environment variables such as database passwords and API keys. In Vue you can use the dotenv
package and in Quasar you can use the quasar-dotenv
package which is wrapper around dotenv
.
cd to your project folder and install quasar-dotenv
npm install quasar-dotenv
Now create a .env
file in your project root and add any variables. For example:
OW_API_KEY = '002db37bfc6be228c33d416df8a6e917'
GM_API_KEY = 'CIzaTyDL6C63jOmI2KCbysrmRSJ_2DriHfFMqZY'
Read more ...
Tags:
quasar
Posted on 2020-08-27T21:57:32Z by Kevin Foong

Quasar is a Vue framework that makes it easy to build hybrid mobile apps using Cordova. In this introduction I'll provide an overview on how to build a simple Android app. Note that the Quasar website already has quite good documentation on how to get started. Here I will outline my notes and any difficulties I encountered along the way during my own set up. Hopefully this tutorial will help someone get started in developing mobile apps.
I also assume that you already have some Vue knowledge.
Step 1 - Install Quasar CLI and create a project in the folder "myquasar"
npm install -g @quasar/cli
quasar create myquasar
Read more ...
Tags:
Vue
quasar
cordova
android