From the course: Advanced Python: Practical Database Examples
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Create a Postgres database - Python Tutorial
From the course: Advanced Python: Practical Database Examples
Create a Postgres database
- [Instructor] We'll be using a Postgres database to store our applications, project, and task data. If you haven't installed it, you can install it from the Postgres website. I've already installed it, so I won't be installing it here. Once it's installed, we need to set up our terminal so we can use it. We can do this by adding it to our path. On Mac, this can be done by adding a line to our zshrc file or our Z profile. We have it in our zshrc file. We add the location of Postgres to our path. Perfect. With Postgres installed and the path setup, we can initialize our database. To activate Postgres, we can use psql -U and log in with the default user. Let's create our database. We'll create a database called project tracker. To access our Postgres data, we can use specific commands. For example, we can use slash l to list our databases. Here we have some default ones along with the one we just created. Similar to…
Contents
-
-
-
-
-
Set up Flask in a Python application2m 20s
-
(Locked)
Create a webpage with Flask2m 52s
-
(Locked)
Build a landing page3m 7s
-
(Locked)
Develop additional routes to enhance your application4m 56s
-
(Locked)
Build a project tasks page2m 16s
-
(Locked)
Create a Postgres database2m 1s
-
(Locked)
Instantiate a Postgres table using Python3m 43s
-
(Locked)
Connect a database to a Python Flask project1m 52s
-
(Locked)
Integrate project data from a Database into Flask2m 57s
-
(Locked)
Integrate task data from a database into a Flask app3m 9s
-
(Locked)
Develop add functionality to add a project5m 7s
-
(Locked)
Develop add functionality to add a task2m 10s
-
(Locked)
Challenge: Develop delete functionality1m
-
(Locked)
Solution: Develop delete functionality7m 13s
-
-