Asynchronous client library for Airtable API
Project description
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
Release history Release notifications | RSS feed
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.1.6.tar.gz
(14.0 kB
view details)
Built Distribution
File details
Details for the file aioairtable-0.1.6.tar.gz
.
File metadata
- Download URL: aioairtable-0.1.6.tar.gz
- Upload date:
- Size: 14.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c344de5a6c893efc59a256d3f6a80c794917f1664efb97c5fdd97104ea5c7a9 |
|
MD5 | a9e831948603f1becfce3f86a4857930 |
|
BLAKE2b-256 | 2babfd3a412848c880d7ff2a849fd919b662f81d49e933b8d84d4477f03dab88 |
File details
Details for the file aioairtable-0.1.6-py3-none-any.whl
.
File metadata
- Download URL: aioairtable-0.1.6-py3-none-any.whl
- Upload date:
- Size: 7.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0e4a3935c2aa534aceaef25763502974f792f8c411d4b1f7870ba2e1db29697b |
|
MD5 | 28877df1615c86558f3693872a535e23 |
|
BLAKE2b-256 | 56b59af652dae1253abb2e101a4baa4df4a91cd577fd4fc77d6f263e0645a04f |