Difference between revisions of "API/Python"

From Open Food Facts wiki
Jump to navigation Jump to search
 
(11 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==
=== Source code ===
+
https://github.com/openfoodfacts/openfoodfacts-python
=== How to install ===
+
This has recently been enriched using code from Robotoff.
=== How to use ===
+
== Offline API (proxy)==
== Offline API==
 
 
=== 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


Python.png


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