Skip to content

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

Notifications You must be signed in to change notification settings

SpencerOfwiti/SQLAlchemy-Primer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published