Now you can connect to Airtable using Streamlit Connection.
Demo: https://airtableexperimentalconnection.streamlit.app/
Just get an access token from Airtable and use the connection in Streamlit.
from airtable_connection import AirtableConnection
conn = st.experimental_connection("airtable",type=AirtableConnection,access_token=airtable_accesstoken)
get_all: Get all information from a table.
records = conn.get_all(airtable_baseid,airtable_tablename,ttl_for_cache)
st.write(records)
get: Get a record from the table.
record = conn.get(airtable_baseid,airtable_tablename,airtable_getrecordId,ttl_for_cache)
st.write(record)
create: Create a new record on the table. _The record data needs to be in a Dict/JSON format.
record = conn.create(airtable_baseid,airtable_tablename,airtable_createrecord)
st.write(record)
update: Update a record on the table. _The field data need to be in a Dict/JSON format.
record = conn.update(airtable_baseid,airtable_tablename,airtable_updaterecordId,airtable_updatefields)
st.write(record)
delete: Delete a record on the table.
record = conn.delete(airtable_baseid,airtable_tablename,airtable_deleterecordId)
st.write(record)