Changes
Jump to navigation
Jump to search
← Older edit
API/Python
(view source)
Revision as of 14:35, 5 September 2023
321 bytes removed
,
14:35, 5 September 2023
no edit summary
Line 3:
Line 3:
== 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 ===
[[Category:API]]
[[Category:API]]
Teolemon
Bureaucrats
,
Interface administrators
,
Suppressors
,
Administrators
3,997
edits
Navigation menu
Personal tools
English
Log in
Namespaces
Page
Discussion
Variants
Views
Read
View source
View history
More
Search
Navigation
Log in
Open Food Facts galaxy
Where am I?
Open Food Facts website
Open Food Facts wiki
Main page
Recent changes
Random page
Open Beauty Facts wiki
Main page
Whole wiki
Help about MediaWiki
Icons in the wiki
Tools
Special pages
Printable version
Admins
Edit sidebar
Styling
Replace text
Special Pages