Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Overview

Download the Files

There are two key files for running this test

...

Bulk_Download.py

...

You will need to download two files - the script that runs the export and a configuration file for the options. These can be downloaded from the Genesis Foods API Example repository (https://github.com/esha/genesis-foods-api-examples ) using the raw download option on the following pages.

...

Take note of what directory you’ve downloaded those files to - that will be important in subsequent steps.

Get Your API Key

Follow the steps listed here to download the API Key for your account. For full reference, check out https://esharesearch.atlassian.net/wiki/spaces/GGA/pages/3293282331/Getting+Started+with+the+Trustwell+Genesis+Foods+GraphQL+API#Obtaining-your-API-Key

...

Setting

Value

endpoint

For production use cases, use https://api.trustwell.com/genesis

For working against the preview environment, use https://api-preview.trustwell.com/genesis

api_key

The API key you obtained from Genesis Foods in the section above.

output_csv

The name of the CSV file you’d like to save the results to. Defaults to genesis_recipes.csv

limit

Limits the number of recipes that will be output to a CSV file. Set this to a lower number for testing purposes. If not present, the script will default to 10000.

MacOS Instructions

...

1

Change to the directory you downloaded the file. For MacOS, this will most likely be the Downloads directory.

cd ~/Downloads

2

Run the command python export_to_csv.py (depending on the whether your executable was python or python3).

Info

If you receive an error that looks like ImportError: urllib3 v2.0 only supports OpenSSL 1.1.1+, currently the 'ssl' module is compiled with 'OpenSSL 1.0.2r  26 Feb 2019' then you will need to issue two additional commands to continue the setup process (just once)

pip uninstall urllib3

pip install 'urllib3<2.0'

Once this is complete, the script should be able to run to completion.

You will see the script run, and the CSV file will be exported based on the configuration option you set in the output_csv variable.

Running the Export - Windows Instructions

Coming soon.

Next Steps