Skip to content

Latest commit

 

History

History
83 lines (61 loc) · 1.72 KB

README.md

File metadata and controls

83 lines (61 loc) · 1.72 KB

SQLAlchemy-Primer

An intro to using SQLAlchemy, Alembic and Postgres for implementing relational databases in python.

Table of contents

Built With

  • Python 3.8 - The programming language used.
  • SQLAlchemy - The python SQL toolkit and Object Relational Mapper used.
  • Alembic - The database migration tool used.
  • PostgreSQL - The relational database used.

Prerequisites

What things you need to install the software and how to install them

  • python 3

Linux:

sudo apt-get install python3.8

Windows:

Download from python.org

Mac OS:

brew install python3
  • pip

Linux and Mac OS:

pip install -U pip

Windows:

python -m pip install -U pip

Installation

Clone this repository:

git clone https://github.com/SpencerOfwiti/SQLAlchemy-Primer.git

To set up virtual environment and install dependencies:

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt

To run alembic migrations:

alembic upgrade head

To run python scripts:

python3 main.py

To remove alembic migrations:

alembic downgrade base

Authors

github follow twitter follow