Skip to content

A minimal containerized Flask REST API implementation using SQLAlchemy as ORM for many supported databases (such as PostgreSQL or SQLite)

License

Notifications You must be signed in to change notification settings

Cinnamoon-dev/flask-social-network

Repository files navigation

Flask API

Using flask to create a minimal application of an API and SQLAlchemy as ORM for a SQLite database.

Creating and using the virtual environment

The python dependency management tool used is poetry. If you never used it you might want to enable the virtual environment inside the project folder.

poetry config virtualenvs.in-project true


Then you can just install the depedencies and enable the virtual environment.

poetry install
poetry shell

Database Configuration

Table Generation

flask db init
flask db migrate
flask db upgrade

Running the Application

python3 run.py

Running the Dockerized Application

You can just skip the steps above and test the application using docker compose. Just run these two commands below and you can send HTTP Requests to port 4444 on localhost, by default.

docker compose up

About

A minimal containerized Flask REST API implementation using SQLAlchemy as ORM for many supported databases (such as PostgreSQL or SQLite)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published