Health Calc Pack Py
Health Calc Pack Py é uma API para calcular o Índice de Massa Corporal (IMC) e os macronutrientes necessários para um indivíduo de acordo com seu objetivo nutricional.
Instalação
-
Clone o repositório: git clone https://github.com/Angelo-Diniz/health-calc-pack-py
-
Entre no diretório do projeto:
cd health_calc_pack_py
- Crie um ambiente virtual e ative-o (opcional, mas recomendado):
python -m venv venv
source venv/bin/activate # Linux/macOS
venv\Scripts\activate # Windows
-
Entre na diretorio /health_calc_pack_py
-
Instale as dependências:
poetry install
Obs: Certifique-se de que o Poetry esteja instalado. Caso contrário, instale-o seguindo as instruções na documentação oficial: https://python-poetry.org/docs/#installation
Executando localmente
Após instalar as dependências, execute o seguinte comando para iniciar o servidor de desenvolvimento:
poetry run python -m health_calc_pack_py.app
A API estará disponível em http://localhost:5000. Envie requisições HTTP para os endpoints disponíveis para interagir com a aplicação.
Swagger
Acesse o http://localhost:5000/docs/
Testes unitários
python -m unittest discover tests
Isso executará todos os testes unitários definidos na pasta tests e exibirá os resultados.
Endpoints
A API fornece os seguintes endpoints:
/imc: Recebe um JSON contendo altura e peso, e retorna o IMC calculado.
/macronutrientes: Recebe um JSON contendo peso e objetivo nutricional, e retorna os macronutrientes calculados.
Release files for health-calc-pack-py 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| health_calc_pack_py-0.4.1.tar.gz | 4.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| health_calc_pack_py-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.2 kB
Release files / health_calc_pack_py-0.4.1.tar.gz
| Download URL | health_calc_pack_py-0.4.1.tar.gz |
|---|---|
| Size | 4.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
03dc88ad80cd5e5bf63c71be271145912421d5a754408237c2a1633845b8a90b
|
|
BLAKE2b-256 checksum How to use checksums |
44fb40bb10ee6e600a348d5550053fb18f29e12bc917395c2e8beb500e298aa3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Windows/10
|
Release files / health_calc_pack_py-0.4.1-py3-none-any.whl
| Download URL | health_calc_pack_py-0.4.1-py3-none-any.whl |
|---|---|
| Size | 7.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
60730cb0134f04986f23aa03ea53df07eaf00a5c5627aef4e0a56284cedd64d2
|
|
BLAKE2b-256 checksum How to use checksums |
d9907f0ba0a606b195e7fea22c42653e7d7eef097b854b5f166611f5fc5e4a70
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.4.2 CPython/3.10.11 Windows/10
|