The goal for this step is to read and write some data to the Google Sheet. This way you can check if Sheety is working correctly before connecting the Kiwi Partners Flight Search API and getting the actual IATA codes for each city to the Google Sheet.

1. Go to the link for the starting Google Sheet and make your own copy of it. Then create a new project on Sheety to work with your copy of the Google sheet.

2. Now use the Sheety API to GET all the data in that sheet and print it out. You should see something like this:

3. Try importing pretty print with the line from pprint import pprint and printing the data out again using pprint() to see it formatted.
4. Pass everything stored in the "prices" key back to the main.py file and store it in a variable called sheet_data, so that you can print the sheet_data from main.py
e.g.

5. In main.py check if sheet_data contains any values for the "iataCode" key. If not, then the IATA Codes column is empty in the Google Sheet. In this case, pass each city name in sheet_data one-by-one to the FlightSearch class. For now, the FlightSearch class can respond with "TESTING" instead of a real IATA code. You should use the response from the FlightSearch class to update the sheet_data dictionary.
Print the updated sheet_data dictionary and you should see:

6. In the DataManager Class make a PUT request and use the row id from sheet_data to update the Google Sheet with the IATA codes. (Do this using code). HINT: Remember to check the checkbox to allow PUT requests in Sheety.
Take a look at the Sheety API documentation to help you:


If successful, you should see the Google Sheet update as if by magic (but it's not magic, it's just code):

IMPORTANT: The Google Sheet URL that you put into Sheety must be owned by the same account as the Google account you used to sign into Sheety.