Airtable ⚡ Streamlit Connection
This repo includes a st.connection for Airtable which wraps the
popular community created and maintained
pyAirtable library.
The initial focus of this connector is on read-only operations: specifically listing records and retrieving the schema of an Airtable base. Write-back support may be added in the future.
👀 Live demo w/ AI ✨
A live demo of the code example in examples/explore.py can be accessed on Streamlit Cloud at http://marks-airtable-connection-demo.streamlit.app [demo video]. Provide your Open AI API key to be able to ask questions about the data in the selected Airtable table. The underlying data can be viewed and cloned here.
Minimal example: retrieve all records from base's first table
See examples/ for additional examples
.streamlit/secrets.toml
[connections.your_connection_name]
personal_access_token = "patXXX" # REQUIRED
base_id = "appXXX" # optional
table_id = "tblXXX" # optional
ℹ️ The Airtable
personal access token
you use should have both
data.records:read
and
schema.bases:read
scopes to use all functionality of this connector.
minimal_example.py
import streamlit as st
from streamlit_airtable import AirtableConnection
# Create connection
conn = st.connection("your_connection_name", type=AirtableConnection)
# Retrieve base schema
base_schema = conn.get_base_schema()
with st.expander("Base schema"):
st.json(base_schema)
# Get the first table's ID
first_table = base_schema["tables"][0]
st.markdown(f"First table ID: `{first_table['id']}` (named `{first_table['name']}`)")
# Retrieve all records for the first table (pyAirtable paginates automatically)
# (Note you can also pass in parameters supported by pyAirtable
# (https://pyairtable.readthedocs.io/en/stable/api.html#parameters) such as as
# max_records, view, sort, and formula into conn.query() like so:
# table_records = conn.query(first_table["id"], max_records=25, view='viwXXX')
table_records = conn.query(table_id=first_table["id"])
st.markdown(f"{len(table_records)} records retrieved")
st.dataframe(table_records)
Steps to replicate the minimal example
- Clone/download this repo
- Install the connector (
pip install -e .) - Move into the
examples/dir (cd examples/) - Copy
.streamlit/secrets.toml.exampleto.streamlit/secrets.tomland provide your own values - Run
streamlit run minimal_example.py
Acknowledgements & thank yous
- Streamlit connection examples: Google Sheets & DuckDB
- pyAirtable
Metadata
Release files for st-airtable-connection 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| st-airtable-connection-0.0.4.tar.gz | 3.9 kB | Without provenance | Details for st-airtable-connection-0.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| st_airtable_connection-0.0.4-py3-none-any.whl | Python 3 | none | any | Details for st_airtable_connection-0.0.4-py3-none-any.whl |
Total release size: 8.2 kB
Release files / st-airtable-connection-0.0.4.tar.gz
| Download URL | st-airtable-connection-0.0.4.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd9cd40da4a0d6b9ddf66cd1c50479336a2a20d39a6b72ac5d04b56b6ac6c3ea
|
|
BLAKE2b-256 checksum How to use checksums |
66804695104f01c2b5d711cddd085b8bd3cecdc84f96d9435767cca18e0ed007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Release files / st_airtable_connection-0.0.4-py3-none-any.whl
| Download URL | st_airtable_connection-0.0.4-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
90c77626299475be09a43ae4bc888c83c4fda8993308c9e7cc2ec5ed29a95c9e
|
|
BLAKE2b-256 checksum How to use checksums |
36ddde032edbd8a12db1ed4c2bade0953457e075b0366a5d5fac42fbe8987574
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.13
|
Security for st-airtable-connection 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.