A nutritional tracker warpped around the USDA FoodData Central API. The warpper allows users to track their daily food intake and analyze the nutritional content of their diet based on the USDA food database and their own selections.
Project description
intakeinformer
A nutritional tracker warpped around the USDA FoodData Central API. The warpper allows users to track their daily food intake and analyze the nutritional content of their diet based on the USDA food database and their own selections.
Getting Started with IntakeInformer
Step 1: Obtain a USDA FoodData Central API Key
- Register for an API Key:
- Visit the USDA FoodData Central API's registration page.
- Fill in the required details and submit the form to register.
- Once registered, you will receive an API key. Keep this key secure as it is your personal access token to the API.
Step 2: Set the API Key as an Environment Variable
Setting the API key as an environment variable keeps it secure and easily accessible by the package.
For Unix/Linux/macOS:
- Open your terminal.
- Run the following command, replacing
'your_api_key_here'
with the actual API key you received:export POETRY_FDC_API_KEY='your_api_key_here'
- To ensure the variable is set, you can run
echo $POETRY_FDC_API_KEY
It should display your API key.
For Windows:
-
Open Command Prompt:
- You can search for "cmd" or "Command Prompt" in the Windows search bar and open it.
-
Set the Environment Variable:
- Run the following command in Command Prompt:
set POETRY_FDC_API_KEY=your_api_key_here
- Replace
your_api_key_here
with your actual API key.
- Run the following command in Command Prompt:
-
Verify the Environment Variable:
- To check if the environment variable is set correctly, run:
echo %POETRY_FDC_API_KEY%
- This should display your API key.
- To check if the environment variable is set correctly, run:
Step 3: Install and Use IntakeInformer
-
Install the Package:
- Use pip (or poetry if you're using it) to install
IntakeInformer
. - Command:
pip install IntakeInformer
(or the appropriate command if using poetry).
- Use pip (or poetry if you're using it) to install
-
Using IntakeInformer:
- Import and use the functions from IntakeInformer in your Python scripts or interactive environment.
- Example:
from intakeinformer import get_calories_for_food_query, dri_benchmark # Use the functions as needed
Step 4: Troubleshooting
- API Key Issues: If you encounter issues related to the API key (such as it not being recognized), ensure that you have correctly set the environment variable and that your current session has access to it.
- Environment Variables: Remember that environment variables set in a terminal session are usually temporary. If you restart your system, you might need to set the environment variable again, unless you add it to your system's permanent profile.
Step 5: Seeking Help
- If you run into any issues or have questions, refer to the documentation of
IntakeInformer
or reach out for support as provided by the package.
Usage
- Link to the example.ipynb file
Contributing
Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.
License
intakeinformer
was created by Junchen Xiong. It is licensed under the terms of the MIT license.
Credits
intakeinformer
was created with cookiecutter
and the py-pkgs-cookiecutter
template.
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
File details
Details for the file intakeinformer-1.0.0.tar.gz
.
File metadata
- Download URL: intakeinformer-1.0.0.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.4 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9815f6c7c6ce42dbc2a28387ce5be3cecc12b652d97bbd95d8876c85edb6b0fd |
|
MD5 | 9d5c607832e6c2efb7bb3ad7f63a183d |
|
BLAKE2b-256 | 5f953470c7ef0ac6d88fd3cc19e8e976af9bef4f7456d513db14ec29e5a00711 |
File details
Details for the file intakeinformer-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: intakeinformer-1.0.0-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.10.4 Darwin/23.1.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 391235f81c12956653252021b0d16dc59da9c5ad20316c24ab3784c91390915f |
|
MD5 | 97635b1ce7f49ba756a8209f3406de31 |
|
BLAKE2b-256 | c88f708e730e5bd28856530fb3ef3c694c898037725623eef6210b3bbf9b7924 |