This repository contains the source code for a four-part tutorial series on SQLAlchemy:
- Databases in Python Made Easy with SQLAlchemy
- Implement an ORM with SQLAlchemy
- Relationships in SQLAlchemy Data Models
- Constructing Database Queries with SQLAlchemy
Get set up locally in two steps:
Replace the values in .env.example with your values and rename this file to .env:
DATABASE_USERNAME
: Username for a SQL database.DATABASE_PASSWORD
: Corresponding password for the above SQL database user.DATABASE_HOST
: Host of the SQL database.DATABASE_PORT
: Numerical port of the SQL database.DATABASE_TABLE
: Name of the SQL database table.DATABASE_CERT_FILE
(optional): Path to SSL certificate file for database.
Remember never to commit secrets saved in .env files to Github.
Get up and running with make run
:
git clone https://github.com/hackersandslackers/sqlalchemy-tutorial.git
cd sqlalchemy-tutorial
make run
Hackers and Slackers tutorials are free of charge. If you found this tutorial helpful, a small donation would be greatly appreciated to keep us in business. All proceeds go towards coffee, and all coffee goes towards more content.