For this tutorial, we’ll use a temporary test Postgres database.

Hit Create test database below to set yours up:

This creates an instant database for you to use for this tutorial. Copy and save the database connection string as we’ll be using it later on to connect to our database.

The database expires after 72 hours if left unclaimed. To claim your database before its expiration, use the claim url above.

That’s the database part of the system already set up.

Optional: connect and take a look

If you have a postgres client installed, you can connect to your database and take a look at it. For example, if you have psql you can connect using this command:

psql your_database_connection_string

You’ll find that the database contains a table called inventory containing some items and quantities, such as what you might use to keep track of your inventory.

Sql
your_database_id=> select * from inventory;
 id |       name     | quantity  
----+----------------+----------
  1 | Vase           |       10
  2 | Bookcase       |        5
  3 | Bathtowel      |       20
  4 | Frying Pan     |       20
  5 | Large Saucepan |       25
  6 | Small Saucepan |       25
  7 | Dinner Plate   |       15
  8 | Dining Chair   |       10
(8 rows)

If you don’t have a postgres client installed, don’t worry. You’ll connect to your database using Python in the next two steps.