not really known
Go to file
2022-12-09 16:41:11 +03:00
deploy Initial commit 2022-12-07 20:16:44 +03:00
med_backend added posts 2022-12-09 16:40:14 +03:00
.dockerignore Initial commit 2022-12-07 20:16:44 +03:00
.editorconfig Initial commit 2022-12-07 20:16:44 +03:00
.env.template added auth, user base crud, minor updates 2022-12-08 02:49:23 +03:00
.flake8 Initial commit 2022-12-07 20:16:44 +03:00
.gitignore Initial commit 2022-12-07 20:16:44 +03:00
.pre-commit-config.yaml added auth, user base crud, minor updates 2022-12-08 02:49:23 +03:00
.pylintrc added auth, user base crud, minor updates 2022-12-08 02:49:23 +03:00
poetry.lock updated user registration, user info 2022-12-08 12:18:59 +03:00
pyproject.toml updated user registration, user info 2022-12-08 12:18:59 +03:00
README.md Update README.md 2022-12-09 16:41:11 +03:00

med_backend

Poetry

API docs - https://dev2.akarpov.ru/api/docs

This project uses poetry. It's a modern dependency management tool.

To run the project use this set of commands:

poetry install
poetry shell
python3 -m med_backend

Docker

You can start the project with docker using this command:

docker-compose -f deploy/docker-compose.yml --project-directory . up --build

Configuration

This application can be configured with environment variables.

You can create .env file in the root directory and place all environment variables here.

All environment variabels should start with "MED_BACKEND_" prefix.

For example if you see in your "med_backend/settings.py" a variable named like random_parameter, you should provide the "MED_BACKEND_RANDOM_PARAMETER" variable to configure the value. This behaviour can be changed by overriding env_prefix property in med_backend.settings.Settings.Config.

An exmaple of .env file:

MED_BACKEND_RELOAD="True"
MED_BACKEND_PORT="8000"
MED_BACKEND_ENVIRONMENT="dev"

Pre-commit

To install pre-commit simply run inside the shell:

pre-commit install

pre-commit is very useful to check your code before publishing it. It's configured using .pre-commit-config.yaml file.

By default it runs:

  • black (formats your code);
  • mypy (validates types);
  • isort (sorts imports in all files);
  • flake8 (spots possibe bugs);
  • yesqa (removes useless # noqa comments).