CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/pypi-pyairtable

Python client for the Airtable API providing comprehensive database operations, ORM functionality, enterprise features, and testing utilities

Pending
Overview
Eval results
Files

cli.mddocs/

Command Line Interface

Complete CLI for direct API interaction, base exploration, record management, and ORM code generation. Provides command-line access to all major pyAirtable functionality.

Capabilities

CLI Commands

# Main commands (run with: python -m pyairtable)
# or: pyairtable (if installed with CLI dependencies: pip install 'pyairtable[cli]')

# Authentication (required for all commands):
# --key API_KEY                    Provide API key directly
# --key-file PATH                  Read API key from file  
# --key-env VAR_NAME              Read API key from environment variable

# Global commands:
# whoami                          Get current user information
# bases                           List all accessible bases

# Base commands:
# base BASE_ID                    Show base information (default: schema)
# base BASE_ID schema             Show base schema  
# base BASE_ID collaborators      Show base collaborators (Enterprise)
# base BASE_ID shares             Show base shares (Enterprise)
# base BASE_ID orm [--table NAME] Generate Python ORM code

# Table commands:
# base BASE_ID table TABLE records         Get table records
# base BASE_ID table TABLE schema          Get table schema
# base BASE_ID table TABLE records [OPTIONS]  Get filtered records
#   --formula FORMULA             Filter with formula
#   --view VIEW_NAME              Filter by view
#   --limit N                     Limit number of records
#   --sort FIELD                  Sort by field (can specify multiple)
#   --field FIELD                 Include only specific fields (can specify multiple)

# Enterprise commands (Enterprise plans only):
# enterprise ENT_ID               Show enterprise info (default: info)
# enterprise ENT_ID info          Show enterprise information
# enterprise ENT_ID user EMAIL    Show user information
# enterprise ENT_ID users         Show all users
# enterprise ENT_ID users --all   Show all enterprise users
# enterprise ENT_ID group GROUP_ID Show group information
# enterprise ENT_ID groups --all   Show all groups

Usage Examples

# Set API key via environment
export AIRTABLE_API_KEY="your_personal_access_token"

# Get current user info
python -m pyairtable whoami

# List all bases
python -m pyairtable bases

# Get base schema
python -m pyairtable base app1234567890abcde schema

# Get table records with filtering
python -m pyairtable base app1234567890abcde table "My Table" records \
  --formula "AND({Status} = 'Active', {Priority} > 3)" \
  --sort "Created" \
  --field "Name" --field "Status" \
  --limit 50

# Generate ORM code for all tables
python -m pyairtable base app1234567890abcde orm > models.py

# Generate ORM code for specific tables
python -m pyairtable base app1234567890abcde orm \
  --table "Contacts" --table "Companies" > contact_models.py

# Enterprise user management
python -m pyairtable enterprise entYourEnterpriseId users --all

# Get specific user details
python -m pyairtable enterprise entYourEnterpriseId user user@company.com

Install with Tessl CLI

npx tessl i tessl/pypi-pyairtable

docs

attachments.md

cli.md

comments.md

core-api.md

enterprise.md

formulas.md

index.md

orm.md

record-operations.md

testing.md

webhooks.md

tile.json