Skip to content

FIIT-Databases/orm-sqlalchemy-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQLAlchemy ORM Example

This repository demonstrates the use of SQLAlchemy ORM, which use the data mapper pattern as architectural design.

The example is based on the data model according to the repository orm-django-example.

You can find examples in the app.py file.

The project utilizes poetry for package management. It retrieves database credential s from the environment variable POSTGRES_CONNECTION. Here is an example of how to set up the project on Linux:

# Clone the repository
git clone [email protected]:FIIT-Databases/orm-sqlalchemy-example.git orm_example
cd orm_example

# Set up Python virtual environment and install dependencies
python -m venv venv
source venv/bin/activate
poetry install

# Set the POSTGRES_CONNECTION environment variable with your database credentials
export POSTGRES_CONNECTION="postgresql+psycopg://postgres@localhost:5432/dbs_orm_sqlalchemy"

# Run the example
flask example

With ❤️ FIIT STU

Releases

No releases published

Packages

No packages published