There are two ways to do this:
pip install sheet2api
from sheet2api import Sheet2APIClient
client = Sheet2APIClient(api_url='https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.get_rows()
Here are some ready to use Google Sheet API examples using the Python client. Simply copy them into your project and you're good to go.
Read all rows
# Returns all rows from the first Sheet.
from sheet2api import Sheet2APIClient
client = Sheet2APIClient(api_url='https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.get_rows()
Read rows which match search terms
# Returns all rows from the first Sheet, filtered by search terms.
from sheet2api import Sheet2APIClient
client = Sheet2APIClient(api_url='https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.get_rows(query={'name': 'Bugs Bunny'})
Add a new row
# Adds a new row to the Sheet.
from sheet2api import Sheet2APIClient
client = Sheet2APIClient(api_url='https://sheet2api.com/v1/FgI6zV8qT121/characters/')
client.create_row(row={'Name': 'Bugs Bunny', 'Favourite Thing': 'Carrots', 'Image': 'Bugs.png'})
For more in-depth examples check out the Github code repository.
It's as easy as that 🎉.
If you need help, please feel free to send a message via the contact page.