Skip to content

oleksandr-projects/Project-Pythongram

Repository files navigation

This project is a REST API application that allows users to share photos. It includes user authentication, photo uploading, photo changing, commenting, and role-based access control.

  • Python
  • FastAPI
  • SQLAlchemy
  • PostgreSQL
  • Redis
  • Cloudinary
  • User registration and authentication with JWT tokens
  • User roles (admin, moderator, user) with different access levels
  • Photo uploading and transformation
  • Commenting on photos
  • QR code generation for photo URLs
  • Cloudinary integration for photo storage
  • Redis for caching
  • PostgreSQL database for data storage
  • Email verification and password reset

A file is required for the project to work /.env with environment variables. Create it with this content and substitute your values.

POSTGRES_DB=
POSTGRES_USER=
POSTGRES_PASSWORD=
POSTGRES_PORT=

SQLALCHEMY_DATABASE_URL=postgresql+psycopg2://${POSTGRES_USER}:${POSTGRES_PASSWORD}@localhost:${POSTGRES_PORT}/${POSTGRES_DB}

SECRET_KEY=
ALGORITHM=

MAIL_USERNAME=
MAIL_PASSWORD=
MAIL_FROM=
MAIL_PORT=
MAIL_SERVER=

redis_host=
redis_port=
redis_password=

CLOUDINARY_NAME=
CLOUDINARY_API_KEY=
CLOUDINARY_API_SECRET=
  1. Install Docker
  2. Clone project
git clone https://github.com/oleksandr-study/Project-Pythongram.git
cd Project-Pythongram
  1. Install the dependencies:
pip install poetry
poetry shell
poetry update
  1. Create .env and add info as at example
  2. Apply database migrations
alembic upgrade head
  1. Start Docker images
docker-compose up
  1. Run the application:
python main.py
  1. GOTO 127.0.0.1:8000
  2. Enjoy

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages