Skip to content

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Database Project Starter

This is a starter project for you to use to start your Python database projects.

There are two videos to support:

Setup

# Clone the repository to your local machine
; git clone git@github.com:makersacademy/databases-in-python-project-starter.git YOUR_PROJECT_NAME

# Or, if you don't have SSH keys set up
; git clone https://github.com/makersacademy/databases-in-python-project-starter.git YOUR_PROJECT_NAME

# Enter the directory
; cd YOUR_PROJECT_NAME

# Set up the virtual environment
; python -m venv databases-starter-venv

# Activate the virtual environment
; source databases-starter-venv/bin/activate 

# Install dependencies
(databases-starter-venv); pip install -r requirements.txt
# Read below if you see an error with `python_full_version`

# Create the database
(databases-starter-venv); createdb YOUR_PROJECT_NAME

# Open lib/database_connection.py and change the database name to YOUR_PROJECT_NAME
(databases-starter-venv); open lib/database_connection.py

# Run the tests - see below if you have any issues
(databases-starter-venv); pytest

# Run the app
(databases-starter-venv); python app.py

I get a ModuleNotFoundError: No module named 'psycopg'
If, after activating your venv and installing dependencies, you see this error when running pytest, please deactivate and reactivate your venv. This should solve the problem - if not, contact your coach.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages