{"id":13411892,"url":"https://github.com/openfoodfacts/openfoodfacts-python","last_synced_at":"2026-02-10T15:19:17.138Z","repository":{"id":11225067,"uuid":"57331837","full_name":"openfoodfacts/openfoodfacts-python","owner":"openfoodfacts","description":"🐍 Python package for Open Food Facts","archived":false,"fork":false,"pushed_at":"2025-04-30T13:03:23.000Z","size":3519,"stargazers_count":365,"open_issues_count":26,"forks_count":77,"subscribers_count":16,"default_branch":"develop","last_synced_at":"2025-05-07T07:31:00.965Z","etag":null,"topics":["allergens","food-classification","food-products","hacktoberfest","ingredients","python"],"latest_commit_sha":null,"homepage":"https://openfoodfacts.github.io/openfoodfacts-python/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/openfoodfacts.png","metadata":{"funding":{"patreon":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"open_collective":"openfoodfacts-server","github":"openfoodfacts","custom":"https://donate.openfoodfacts.org"},"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2016-04-28T20:30:18.000Z","updated_at":"2025-05-01T13:44:55.000Z","dependencies_parsed_at":"2023-02-19T06:00:59.772Z","dependency_job_id":"70649562-4c96-46ec-944d-dbc402dad680","html_url":"https://github.com/openfoodfacts/openfoodfacts-python","commit_stats":{"total_commits":355,"total_committers":22,"mean_commits":"16.136363636363637","dds":0.7718309859154929,"last_synced_commit":"4bff04616ad6e711c8db28f730bb1a58f3928829"},"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfoodfacts%2Fopenfoodfacts-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfoodfacts%2Fopenfoodfacts-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfoodfacts%2Fopenfoodfacts-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/openfoodfacts%2Fopenfoodfacts-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/openfoodfacts","download_url":"https://codeload.github.com/openfoodfacts/openfoodfacts-python/tar.gz/refs/heads/develop","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254110374,"owners_count":22016391,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["allergens","food-classification","food-products","hacktoberfest","ingredients","python"],"created_at":"2024-07-30T20:01:18.134Z","updated_at":"2026-02-10T15:19:17.133Z","avatar_url":"https://github.com/openfoodfacts.png","language":"Python","funding_links":["https://opencollective.com/openfoodfacts-server","https://github.com/sponsors/openfoodfacts","https://donate.openfoodfacts.org"],"categories":["Python","Agriculture and Food Safety"],"sub_categories":[],"readme":"# Open Food Facts Python SDK\n\n\u003cdiv align=\"center\"\u003e\n  \u003cimg width=\"400\" src=\"https://blog.openfoodfacts.org/wp-content/uploads/2022/05/EXE_LOGO_OFF_RVB_Plan-de-travail-1-copie-0-1-768x256.jpg\" alt=\"Open Food Facts\"/\u003e\n\u003c/div\u003e\n\n## Status\n\n[![Project Status](https://opensource.box.com/badges/active.svg)](https://opensource.box.com/badges)\n[![Build Status](https://travis-ci.org/openfoodfacts/openfoodfacts-python.svg?branch=master)](https://travis-ci.org/openfoodfacts/openfoodfacts-python)\n[![codecov](https://codecov.io/gh/openfoodfacts/openfoodfacts-python/branch/master/graph/badge.svg)](https://codecov.io/gh/openfoodfacts/openfoodfacts-python)\n[![Latest Version](https://img.shields.io/pypi/v/openfoodfacts.svg)](https://pypi.org/project/openfoodfacts)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://github.com/openfoodfacts/openfoodfacts-python/blob/master/LICENSE)\n\n## Description\n\nThis is the official Python SDK for the [Open Food Facts](https://world.openfoodfacts.org/) project.\nIt provides a simple interface to the [Open Food Facts API](https://openfoodfacts.github.io/openfoodfacts-server/api/) and allows you to:\n\n- Get information about a product\n- Perform text search\n- Create a new product or update an existing one\n\nIt also provides some helper functions to make it easier to work with Open Food Facts data and APIs, such as:\n\n- getting translation of a taxonomized field in a given language\n- downloading and iterating over the Open Food Facts data dump\n- handling OCRs of Open Food Facts images generated by Google Cloud Vision\n\nPlease note that this SDK is still in beta and the API is subject to change. Make sure to pin the version in your requirements file.\n\n## Third party applications\nIf you use this SDK or want to use this SDK, make sure to read the [REUSE](https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/REUSE.md) and ensure you comply with the OdBL licence, in addition to the licence of this package (MIT). Make sure you at least fill the form, and feel free to open a PR to add your application in this list :-)\n\n\n## Installation\n\nThe easiest way to install the SDK is through pip:\n\n    pip install openfoodfacts\n\nor manually from source:\n\n    git clone https://github.com/openfoodfacts/openfoodfacts-python\n    cd openfoodfacts-python\n    pip install .  # Note the “.” at the end!\n\n## Examples\n\nAll the examples below assume that you have imported the SDK and instanciated the API object:\n\n```python\nimport openfoodfacts\n\n# User-Agent is mandatory\napi = openfoodfacts.API(user_agent=\"MyAwesomeApp/1.0\")\n```\n\n*Get information about a product*\n\n```python\ncode = \"3017620422003\"\napi.product.get(code, fields=[\"code\", \"product_name\"])\n# {'code': '3017620422003', 'product_name': 'Nutella'}\n```\n\n*Perform text search*\n\n```python\napi.product.text_search(\"mineral water\")\n# {\"count\": 3006628, \"page\": 1, \"page_count\": 20, \"page_size\": 20, \"products\": [{...}], \"skip\": 0}\n```\n\n*Create a new product or update an existing one*\n\n```python\nresults = api.product.update({\n    \"code\": CODE,\n    \"product_name_en\": \"blueberry jam\",\n    \"ingredients_text_en\": \"blueberries, sugar, pectin, citric acid\"\n})\n```\n\nwith `CODE` the product barcode. The rest of the body should be a dictionary of fields to create/update.\n\nTo see all possible capabilities, check out the [usage guide](https://openfoodfacts.github.io/openfoodfacts-python/usage/).\n\n\n\n## Contributing\n\nAny help is welcome, as long as you don't break the continuous integration.\nFork the repository and open a Pull Request directly on the \"develop\" branch.\nA maintainer will review and integrate your changes.\n\nMaintainers:\n\n- [Anubhav Bhargava](https://github.com/Anubhav-Bhargava)\n- [Frank Rousseau](https://github.com/frankrousseau)\n- [Pierre Slamich](https://github.com/teolemon)\n- [Raphaël](https://github.com/raphael0202)\n\nContributors:\n\n- Agamit Sudo\n- [Daniel Stolpe](https://github.com/numberpi)\n- [Enioluwa Segun](https://github.com/enioluwas)\n- [Nicolas Leger](https://github.com/nicolasleger)\n- [Pablo Hinojosa](https://github.com/Pablohn26)\n- [Andrea Stagi](https://github.com/astagi)\n- [Benoît Prieur](https://github.com/benprieur)\n- [Aadarsh A](https://github.com/aadarsh-ram)\n\n## Copyright and License\n\n    Copyright 2016-2024 Open Food Facts\n\nThe Open Food Facts Python SDK is licensed under the [MIT License](https://github.com/openfoodfacts/openfoodfacts-python/blob/develop/LICENSE).\n\nOther files that are not part of the SDK itself may be under different a different license.\nThe project complies with the [REUSE 3.3 specification](https://reuse.software/spec-3.3/),\nso any such files should be marked accordingly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfoodfacts%2Fopenfoodfacts-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopenfoodfacts%2Fopenfoodfacts-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopenfoodfacts%2Fopenfoodfacts-python/lists"}