Skip to main content

Uma API para calcular IMC e macronutrientes

Project description

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

  1. Clone o repositório: git clone https://github.com/Angelo-Diniz/health-calc-pack-py

  2. Entre no diretório do projeto:

cd health_calc_pack_py

  1. Crie um ambiente virtual e ative-o (opcional, mas recomendado):

python -m venv venv

source venv/bin/activate # Linux/macOS

venv\Scripts\activate # Windows

  1. Entre na diretorio /health_calc_pack_py

  2. 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

health_calc_pack_py-0.4.1.tar.gz (4.3 kB view details)

Uploaded Source

Built Distribution

health_calc_pack_py-0.4.1-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file health_calc_pack_py-0.4.1.tar.gz.

File metadata

  • Download URL: health_calc_pack_py-0.4.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.10.11 Windows/10

File hashes

Hashes for health_calc_pack_py-0.4.1.tar.gz
Algorithm Hash digest
SHA256 03dc88ad80cd5e5bf63c71be271145912421d5a754408237c2a1633845b8a90b
MD5 54e83da0c2141252737ad09e437d8c44
BLAKE2b-256 44fb40bb10ee6e600a348d5550053fb18f29e12bc917395c2e8beb500e298aa3

See more details on using hashes here.

File details

Details for the file health_calc_pack_py-0.4.1-py3-none-any.whl.

File metadata

File hashes

Hashes for health_calc_pack_py-0.4.1-py3-none-any.whl
Algorithm Hash digest
SHA256 60730cb0134f04986f23aa03ea53df07eaf00a5c5627aef4e0a56284cedd64d2
MD5 ed09267b7df060225fe1e778c56b8d1e
BLAKE2b-256 d9907f0ba0a606b195e7fea22c42653e7d7eef097b854b5f166611f5fc5e4a70

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page