{"id":14959620,"url":"https://github.com/marks/streamlit-airtable-connection","last_synced_at":"2025-09-20T13:31:32.523Z","repository":{"id":184890864,"uuid":"672636019","full_name":"marks/streamlit-airtable-connection","owner":"marks","description":"Airtable connection for Streamlit, includes AI ✨ example to ask questions from records","archived":false,"fork":false,"pushed_at":"2024-08-27T14:37:11.000Z","size":33,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-10-29T23:44:37.506Z","etag":null,"topics":["airtable","airtable-api","pyairtable","streamlit","streamlit-component","streamlit-components"],"latest_commit_sha":null,"homepage":"https://marks-airtable-connection-demo.streamlit.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/marks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-07-30T18:45:19.000Z","updated_at":"2024-08-27T14:37:15.000Z","dependencies_parsed_at":"2024-11-12T17:03:13.872Z","dependency_job_id":"2c6977d5-3cc9-428c-b798-812edc0f72bf","html_url":"https://github.com/marks/streamlit-airtable-connection","commit_stats":{"total_commits":33,"total_committers":2,"mean_commits":16.5,"dds":0.2727272727272727,"last_synced_commit":"62ee66d1b18a97ae5bfdc23367a8dbecff2b5118"},"previous_names":["marks/streamlit-airtable-connection"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fstreamlit-airtable-connection","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fstreamlit-airtable-connection/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fstreamlit-airtable-connection/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/marks%2Fstreamlit-airtable-connection/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/marks","download_url":"https://codeload.github.com/marks/streamlit-airtable-connection/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233665634,"owners_count":18710918,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["airtable","airtable-api","pyairtable","streamlit","streamlit-component","streamlit-components"],"created_at":"2024-09-24T13:20:15.582Z","updated_at":"2025-09-20T13:31:27.242Z","avatar_url":"https://github.com/marks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Airtable ⚡ Streamlit Connection\n\nThis repo includes a `st.connection` for Airtable which wraps the\npopular community created and maintained\n[pyAirtable](https://github.com/gtalarico/pyairtable) library.\n\nThe initial focus of this connector is on read-only operations: specifically\n[listing records](https://airtable.com/developers/web/api/list-records) and\n[retrieving the schema](https://airtable.com/developers/web/api/get-base-schema)\nof an Airtable base. Write-back support may be added in the future.\n\n### 👀 Live demo w/ AI ✨\nA live demo of the code example in  [`examples/explore.py`](./examples/explore.py) can be accessed on Streamlit Cloud at [http://marks-airtable-connection-demo.streamlit.app](http://marks-airtable-connection-demo.streamlit.app) [[demo video](https://share.support.airtable.com/RBuJRnyL)]. 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](https://airtable.com/appdbRXgibDiQkNQN/shrIO0m8oyeQJTf9T).\n\n---\n\n### Minimal example: retrieve all records from base's first table\n\n_See `examples/` for additional examples_\n\n#### [`.streamlit/secrets.toml`](./examples/.streamlit/secrets.toml.example)\n\n```\n[connections.your_connection_name]\npersonal_access_token = \"patXXX\" # REQUIRED\nbase_id = \"appXXX\" # optional\ntable_id = \"tblXXX\" # optional\n```\n\nℹ️ The Airtable\n[personal access token](https://airtable.com/developers/web/guides/personal-access-tokens)\nyou use should have both\n[`data.records:read`](https://airtable.com/developers/web/api/scopes#data-records-read)\nand\n[`schema.bases:read`](https://airtable.com/developers/web/api/scopes#schema-bases-read)\nscopes to use all functionality of this connector.\n\n#### [`minimal_example.py`](./examples/minimal_example.py)\n\n```python\nimport streamlit as st\nfrom streamlit_airtable import AirtableConnection\n\n# Create connection\nconn = st.connection(\"your_connection_name\", type=AirtableConnection)\n\n# Retrieve base schema\nbase_schema = conn.get_base_schema()\nwith st.expander(\"Base schema\"):\n    st.json(base_schema)\n\n# Get the first table's ID\nfirst_table = base_schema[\"tables\"][0]\nst.markdown(f\"First table ID: `{first_table['id']}` (named `{first_table['name']}`)\")\n\n# Retrieve all records for the first table (pyAirtable paginates automatically)\n# (Note you can also pass in parameters supported by pyAirtable\n# (https://pyairtable.readthedocs.io/en/stable/api.html#parameters) such as as\n# max_records, view, sort, and formula into conn.query() like so:\n# table_records = conn.query(first_table[\"id\"], max_records=25, view='viwXXX')\ntable_records = conn.query(table_id=first_table[\"id\"])\nst.markdown(f\"{len(table_records)} records retrieved\")\nst.dataframe(table_records)\n```\n\n#### Steps to replicate the minimal example\n\n1. Clone/download this repo\n2. Install the connector (`pip install -e .`)\n3. Move into the `examples/` dir (`cd examples/`)\n4. Copy `.streamlit/secrets.toml.example` to `.streamlit/secrets.toml`\n   and provide your own values\n5. Run `streamlit run minimal_example.py`\n\n### Acknowledgements \u0026 thank yous\n\n- Streamlit connection examples:\n  [Google Sheets](https://github.com/streamlit/gsheets-connection) \u0026\n  [DuckDB](https://github.com/streamlit/release-demos/blob/master/1.22/st-experimental-connection/duckdb_connection/connection.py)\n- [pyAirtable](https://github.com/gtalarico/pyairtable)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Fstreamlit-airtable-connection","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarks%2Fstreamlit-airtable-connection","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarks%2Fstreamlit-airtable-connection/lists"}