Skip to content

Version 0.1.1

Compare
Choose a tag to compare
@astagi astagi released this 20 Jul 14:33

What's new? πŸš€

  • #61 Add generator for search, get_by ...
for product in openfoodfacts.products.get_all_by_country('italy'):
    print (product.get('product_name', 'Unknown'))

for product in openfoodfacts.products.get_all_by_facets({'trace': 'eggs', 'country': 'france'}):
    print (product.get('product_name', 'Unknown'))

for product in openfoodfacts.products.search_all('kinder bueno'):
    print (product.get('product_name', 'Unknown'))
  • #62 Use pet_products and beauty_products as aliases
import openfoodfacts

for product in openfoodfacts.beauty_products.get_by_facets({
  'packaging': 'Plastique',
  'country': 'france'
}):
    print (product.get('product_name', 'Unknown'))