From 6920e0fb615e140e44d8d9b3a9a0b29138443526 Mon Sep 17 00:00:00 2001 From: Lucidiot Date: Wed, 23 Oct 2019 08:50:08 +0200 Subject: [PATCH] Update README --- README.md | 31 ------------------------------- README.rst | 43 +++++++++++++++++++++++++++++++++++++++++++ setup.py | 4 ++-- 3 files changed, 45 insertions(+), 33 deletions(-) delete mode 100644 README.md create mode 100644 README.rst diff --git a/README.md b/README.md deleted file mode 100644 index 4459759..0000000 --- a/README.md +++ /dev/null @@ -1,31 +0,0 @@ -# python-usda - -python-usda is a fork of [pygov](https://pypi.org/project/pygov/) focused on [USDA's Food Composition Database API](http://ndb.nal.usda.gov/ndb/doc/). Browse full documentation on [Read the Docs](https://python-usda.readthedocs.io/en/latest) - -## Installation - -``` -pip install python-usda -``` - -## Usage - -``` python -from usda.client import UsdaClient - -client = UsdaClient("YOUR_API_KEY") -foods = client.list_foods(5) - -for food in foods: - print(food.name) -``` - -Result: - -``` -Abiyuch, raw -Acerola juice, raw -Acerola, (west indian cherry), raw -Acorn stew (Apache) -Agave, cooked (Southwest) -``` diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..31d7d32 --- /dev/null +++ b/README.rst @@ -0,0 +1,43 @@ +python-usda +=========== + + ⚠️ Since October 1, 2019, the APIs this package relies on have been + deprecated. python-usda 1.x will remove those APIs and rely on the new + `Food Data Central`_ APIs. + +python-usda is a fork of `pygov`_ focused on +`USDA's Food Composition Database API `_. +Have a look at the `documentation`_! + +Setup +----- + +:: + + pip install python-usda + +Usage +----- + +.. code:: python + + from usda.client import UsdaClient + + client = UsdaClient("YOUR_API_KEY") + foods = client.list_foods(5) + + for food in foods: + print(food.name) + +Result:: + + Abiyuch, raw + Acerola juice, raw + Acerola, (west indian cherry), raw + Acorn stew (Apache) + Agave, cooked (Southwest) + +.. _Food Data Central: https://fdc.nal.usda.gov/api-guide.html +.. _pygov: https://pypi.org/project/pygov/ +.. _usda: http://ndb.nal.usda.gov/ndb/doc/ +.. _documentation: https://lucidiot.gitlab.io/python-usda/ diff --git a/setup.py b/setup.py index 2bb5182..7188d1f 100755 --- a/setup.py +++ b/setup.py @@ -13,7 +13,7 @@ setup( packages=find_packages( exclude=["*.tests", "*.tests.*", "tests.*", "tests"]), package_data={ - '': ['*.md', 'LICENSE', 'README'], + '': ['*.rst', 'LICENSE', 'README'], }, install_requires=read_requirements('requirements.txt'), python_requires='>=3.4', @@ -22,7 +22,7 @@ setup( }, license='GNU General Public License 3', description="A fork of pygov focused on USDA nutritional database API", - long_description=open('README.md').read(), + long_description=open('README.rst').read(), long_description_content_type='text/markdown', keywords="api usda nutrition food", url="https://gitlab.com/Lucidiot/python-usda",