Step-by-Step Python and Postgres Tutorial with psycopg2


Video is ready, Click Here to View ×

Checkout my Python on the Backend Udemy Course 📐⟶

In this tutorial, we will go through the basic steps on how to write a python script to read and write data on a Postgres database. We will start by describing what we have setup. I have a postgres instance running on a docker container which I will be using for this tutorial. You can watch this video that I made to learn how to spin up a postgres docker container…

8 thoughts on “Step-by-Step Python and Postgres Tutorial with psycopg2

  1. Great job explaining SQL injection. I was chuckling the entire time at your antics haha.

    "Fancy print" is called f-strings.
    When you are iterating over your tuples you can unpack them directly instead of slicing by index, eg:
    for pk, name in rows:

    When your tuples are large, it's easy to remember by variable name instead of index position.

  2. Hi Hussein. Python is a very powerful language but I've never come across any material covering security safeguards in Python which worries me. Is there an equivalent of.NET authentication & authorization in Python?

Leave a Reply

Your email address will not be published. Required fields are marked *