Skip to main content

Asynchronous client library for Airtable API

Project description

Asynchronous client library for Airtable API

PyPI version License: MIT Downloads

Key Features

  • Asyncio and aiohttp based
  • All Airtable REST API methods supported
  • API rate limit support
  • Fully type annotated (PEP 484)
  • Mapping of table fields into variable names

Installation

aioairtable is available on PyPI. Use pip to install it:

pip install aioairtable

Requirements

Using aioairtable

Pass a value of any hashable type to acquire or do not specify any parameter:

import asyncio

from msgspec import Struct, field

from aioairtable import Airtable, SortDirection


class TableFields(Struct):
    field_1: str | None = field(default=None, name="Field 1")
    field_2: str | None = field(default=None, name="Field 2")
    field_3: str | None = field(default=None, name="Field 3")


async def main() -> None:
    airtable = Airtable(api_key="some_key")
    base = airtable.base("base_id")
    table = base.table("table_name", TableFields)
    records, offset = await table.list_records(
        fields=("field_1", "field_2"),
        filter_by_formula="{field_3}",
        max_records=100500,
        page_size=3,
        sort=(
            ("field_1", SortDirection.ASC),
            ("field_2", SortDirection.DESC),
        ),
        view="table3",
        offset="record033",
    )
    for record in records:
        print(record)

    record = await table.create_record(
        TableFields(
            field_1="value_1_new_001",
            field_2="value_2_new_001",
            field_3="value_3_new_001",
        )
    )
    await record.delete()


asyncio.run(main())

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aioairtable-0.2.6.tar.gz (7.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aioairtable-0.2.6-py3-none-any.whl (8.3 kB view details)

Uploaded Python 3

File details

Details for the file aioairtable-0.2.6.tar.gz.

File metadata

  • Download URL: aioairtable-0.2.6.tar.gz
  • Upload date:
  • Size: 7.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aioairtable-0.2.6.tar.gz
Algorithm Hash digest
SHA256 26f1fe94acecf26e190416ee5b9c86592bb967a0a665256027d7d350a63a4602
MD5 c75282601991421fcdbb8b6c1ce7aba3
BLAKE2b-256 ec27b7bcaa6826316b8d8da83ccf59b01ec57c30d426c0abaf99e6be34a7553b

See more details on using hashes here.

File details

Details for the file aioairtable-0.2.6-py3-none-any.whl.

File metadata

  • Download URL: aioairtable-0.2.6-py3-none-any.whl
  • Upload date:
  • Size: 8.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.11 {"installer":{"name":"uv","version":"0.9.11"},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for aioairtable-0.2.6-py3-none-any.whl
Algorithm Hash digest
SHA256 4096eebdecf95979b144d232ca9ce9a9be3e371c43afaef3563fd21f8f4b355d
MD5 5101f8bf87289a75edc74af60891eba1
BLAKE2b-256 3f86aef1ca96ab7e51f5fd734ca7b48609c799eba3d64408556337052aa48451

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page