RESTful Flask/Postgres API for for image processing and uploading to AWS S3
The accompanying frontend repo can be seen here.
A deployed version can be found here.
Clone the repo:
git clone https://github.com/michaelpappas/pixly-backend
cd pixly-backend
Set the environment variables:
touch .env
# open .env and modify the environment variables
or
cp .env.example .env
# open .env and modify the environment variables
You'll need Python3 and PostgreSQL
python3 -m venv venv
source venv/bin/activate
pip3 install -r requirements.txt
# create a virtual environment and install the dependencies
Create pixly database in psql with
CREATE DATABASE pixly;
To run the backend run "flask run -p 5002". The frontend will by default look for the backend at 5002 or a specified url in your .env file
\ # Root folder
|--.env.example # example environment variables
|--app.py # main routes scripts
|--image_processing.py # scripts for image processing
|--models.py # database models and methods
|--pixly_aws.py # scripts for aws
|--readme.md # project readme
|--requirements.txt # dependencies
List of available routes:
Images routes:
GET api/images
- get images (optional filtering)
GET api/images/:id
- get image by id
POST api/images
- post image
PATCH api/images:id
- patch image to increment views
- Write Unittest
- Build out tags functionality
- Enable filtering by exif data like manufacturer and device
- Modify image processing to allow for HEIC image upload and exif processing