API/Python: Difference between revisions

From Open Food Facts wiki
No edit summary
No edit summary
 
(10 intermediate revisions by the same user not shown)
Line 1: Line 1:
Documentation of the Python bindings
Documentation of the Python bindings
[[File:Python.png|thumb]]


== Online API==
== Online API==
https://github.com/openfoodfacts/openfoodfacts-python
https://github.com/openfoodfacts/openfoodfacts-python
== Offline API==
This has recently been enriched using code from Robotoff.
== Offline API (proxy)==
=== Source code ===
=== Source code ===
https://github.com/openfoodfacts/OpenFoodFacts-APIRestPython
https://github.com/openfoodfacts/OpenFoodFacts-APIRestPython
=== How to install ===
* Install python 3
* Install mongodb
* Install pip
* Install requirements : $ pip install -r requirements.txt
* Download the database from : http://world.openfoodfacts.org/data/openfoodfacts-mongodbdump.tar.gz
* Import to local mongodb : $ mongorestore -d off -c products /foldertobsonfile/products.bson
* Launch api : $ python3 runApiRESTServer.py
* That's all !
=== How to use ===
=== How to use ===
== Open Food Facts projects in Python you can contribute to ==
* Repositories with Python: https://github.com/orgs/openfoodfacts/repositories?q=python
* Robotoff - https://github.com/openfoodfacts/robotoff -  [https://github.com/openfoodfacts/robotoff/issues/374 What can I work on?]
* [[Folksonomy Engine]] (Python/FastAPI) ([https://github.com/openfoodfacts/folksonomy api/ Server] ([https://github.com/openfoodfacts/folksonomy api/issues/70/ What can I work on ?])
* [[Prices|Open Prices]] (FastAPI, being transformed to Django) - [https://github.com/openfoodfacts/open-prices Open Prices] ([https://github.com/openfoodfacts/open-prices/issues/39 What can I work on ?])
* [[Taxonomy editor|Taxonomy editor -]] https://github.com/openfoodfacts/taxonomy-editor
*Facet Knowledge Panels - https://github.com/openfoodfacts/facets-knowledge-panels/
== Apps reusing the Python SDK ==
== Get in touch==
{{Box
| 1    =  Slack channel
| 2    =  [https://openfoodfacts.slack.com/messages/C13993JDD/ #python]
}}
[[Category:API]]
[[Category:API]]
[[Category:Python]]
[[Category:SDKs]]

Latest revision as of 16:35, 27 August 2024

Documentation of the Python bindings



Online API

https://github.com/openfoodfacts/openfoodfacts-python This has recently been enriched using code from Robotoff.

Offline API (proxy)

Source code

https://github.com/openfoodfacts/OpenFoodFacts-APIRestPython

How to use

Open Food Facts projects in Python you can contribute to


Apps reusing the Python SDK

Get in touch

Slack channel