Skip to content

piavik/PhotoShare

Repository files navigation

FastAPI Project

coverage

Requirements


Setup Project

  • Make virtual environment:

By default, the dependencies are managed with Poetry, go there and install it.

You can install all the dependencies with:

$ poetry install
  • Activate virtual environment:

Then you can start a shell session with the new environment with:

$ poetry shell

Make sure your editor is using the correct Python virtual environment.

  • Create your own .env file based on the template .env.example

Running Application

  • Start the stack with Docker Compose:
docker compose up -d
  • Initialize alembic migrations:
alembic upgrade head
  • Starting application:
py main.py

Create docker container with the application

  • Create Docker container:
DOCKER_BUILDKIT=1 docker build --rm . -t photoshare:latest
  • Run Docker container:
docker run -d --name photoshare --env-file ./.env -p 8000:8000 photoshare:latest

Acessing on local

The application will get started in http://127.0.0.1:8000

Swagger Documentation: http://127.0.0.1:8000/docs

Redoc Documentation: http://127.0.0.1:8000/redoc


Testing

For run tests

pytest

For run tests with coverage report

pytest --cov=app tests

About

FastAPI pictures management app

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages