less than 1 minute read

In this blog post Iโ€™ll share a basic Flask and PostgreSQL setup that you can use for local development.

This tiny prototype:

  • Creates a postgres database
  • Inserts some data in this database
  • Runs a flask api
  • Exposes an endpoint to add data to the database
  • Fetches the results from the database and renders them

I learned:

  • How to create a postgres database
  • How to create tables in a postgres database
  • How to grant postgres users privileges
  • How to connect to a postgres database with python
  • How to insert data in a postgres with python
  • How to fetch data from a postgres with python
  • How to make flask and postgres talk to each other

Full code can be found here.

Credits go to this tutorial.

Subscribe

Comments