Skip to main content

Easy querying of OpenFoodFacts.

Project description

What is Open Food Facts?

A food products database

Open Food Facts is a database of food products with ingredients, allergens, nutrition facts and all the tidbits of information we can find on product labels.

Made by everyone

Open Food Facts is a non-profit association of volunteers. 1800+ contributors like you have added 700 000+ products from 150 countries using our Android, iPhone or Windows Phone app or their camera to scan barcodes and upload pictures of products and their labels.

For everyone

Data about food is of public interest and has to be open. The complete database is published as open data and can be reused by anyone and for any use. Check-out the cool reuses or make your own! - https://world.openfoodfacts.org

Status

Project Status Average time to resolve an issue Percentage of issues still open Build Status codecov License: MIT

Contributing

Any help is welcome, as long as you don’t break the continuous integration. Fork the repository and open a Pull Request directly on the master branch. A maintainer will review and integrate your changes.

Maintainers:

Contributors:

Installation

sudo pip install git+https://github.com/openfoodfacts/openfoodfacts-python

or:

git clone https://github.com/openfoodfacts/openfoodfacts-python
cd openfoodfacts-python
sudo python setup.py install

Docs

Example Usage

Query a Facet

brands = openfoodfacts.facets.get_brands()

Basic Search

search_result = openfoodfacts.products.search(query)

Add a new product.

status_code = openfoodfacts.products.add_new_product({
  'code': barcode,
  'user_id'  : myUsername,
  'password'  : myPassword,
  'product_name' : myProduct,
  'stores'  : store,
  'brands': brand,
  'packaging': packaging
})

To see all possible capabilities, check out the usage guide.

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

openfoodfacts-0.1.0.tar.gz (8.6 kB view hashes)

Uploaded Source

Built Distribution

openfoodfacts-0.1.0-py3-none-any.whl (11.0 kB view hashes)

Uploaded Python 3

Supported by

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