No project description provided
Project description
Python practice field
Just a practice field for making, linting, testing and describing python projects and setting CI/CD for it.
Here is a Docker image that runs FastAPI server with two simple get and post methods.
TO DO:
CI:
Добавить правила для коммитов:
- мануал шаг с деплоем на тест
- мануал шаг с деплоем на прод
General:
- Добавить test coverage
- Описать все, что происходит в репо в шапке
Requirements
- python ~3.10
Debug
Clone repo first:
git clone git@github.com:alexnazarv/training-project-api.git
Run without Docker
Install poetry:
pip install poetry==1.5.1
Move to project directory and make a venv:
cd training-project-api && poetry shell
Install dependencies and run the app:
poetry install && poetry run python3 -m app.main
Run with Docker
Build image and run container:
docker build . -t apicontainer -t apicontainer:test &&
docker run -d --rm --name apicontainer -p 8000:8000 apicontainer:test &&
docker rmi $(docker images -f "dangling=true" -q)
Clean up container and image:
docker rm -f apicontainer &&
docker rmi $(docker images apicontainer -q) -f
Run tests
poetry run python3 -m pytest --cov=app
Run linters
poetry run flake8 . && mypy . && isort .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for python_practice_field-0.0.1rc2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7616185dd9baa86db91d33608445925dd2ea66ab2d63c100b9a76e1ceb877644 |
|
MD5 | 23809cf2da8ca7ec412d436aa4fccb7f |
|
BLAKE2b-256 | 15e1644b845ac239d5518581867c6b488584956031ce039afb480c47b796fe0f |
Close
Hashes for python_practice_field-0.0.1rc2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 52a57071438e35390c028af000a01348cea78c813a16518b14eb3624a5c24930 |
|
MD5 | 3440c1a6a84a037ce89f8ca85fda5d85 |
|
BLAKE2b-256 | 179f195eeb6dc4625e480ae082cc8e698c9b44c2e3bf8139d959148c6df19052 |