Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
366 commits
Select commit Hold shift + click to select a range
4b3965c
Merge pull request #349 from BAPCon/main
mesozoic Mar 15, 2024
001885b
Add decorator for kwargs modification
BAPCon Mar 18, 2024
927414a
Update model.py
BAPCon Mar 18, 2024
1a58b71
Fix failing integration test from #349
mesozoic Mar 18, 2024
23a02aa
Release 2.3.2
mesozoic Mar 18, 2024
b676bf0
Merge pull request #353 from mesozoic/release-2.3.2
mesozoic Mar 19, 2024
be844ec
Merge branch 'main' into formulas
mesozoic Mar 19, 2024
2744c67
Fix docs typos
mesozoic Mar 19, 2024
7e7c853
Merge pull request #329 from mesozoic/formulas
mesozoic Mar 19, 2024
ff4fac4
Return `""` and `False` from TextField, CheckboxField
mesozoic Mar 13, 2024
701ea70
Fix __all__ in pyairtable.orm.fields
mesozoic Mar 14, 2024
033a36e
SelectField should distinguish `""` and `None`
mesozoic Mar 15, 2024
ab13ce5
orm_null_values: Changelog
mesozoic Mar 19, 2024
eef7b6f
Merge pull request #347 from mesozoic/orm_null_values
mesozoic Mar 19, 2024
0933afc
Update `orm.Model._kwargs_union`
BAPCon Mar 20, 2024
152094f
Add 'disallowed_args' to 'Model.all' and 'Model.first'
BAPCon Mar 20, 2024
20fabfc
Update model.py
BAPCon Mar 20, 2024
3065db3
Update test_orm_model.py
BAPCon Mar 20, 2024
e205e44
Update model.py
BAPCon Mar 20, 2024
4d86503
Merge branch 'main' into Testing
BAPCon Mar 20, 2024
ecc3006
Fix broken docs for orm.fields constants
mesozoic Mar 22, 2024
51b4b05
Model.created_time is now a datetime, not a str
mesozoic Mar 15, 2024
cf3498f
Schema objects use datetime instead of str
mesozoic Mar 16, 2024
f93e545
Remove deprecated datetime.utcnow()
mesozoic Mar 19, 2024
c289427
Do not call orm.Model.Meta callables when subclasses are created
mesozoic Mar 22, 2024
939c2d4
Update model.py
BAPCon Mar 22, 2024
1256217
Merge branch 'Testing' of https://github.com/BAPCon/pyairtable into T…
BAPCon Mar 22, 2024
769d924
Merge pull request #356 from mesozoic/fix-docs
mesozoic Mar 22, 2024
cfd304b
Merge pull request #357 from mesozoic/orm_meta
mesozoic Mar 22, 2024
6fef52d
Only run integration tests once, not in each environment
mesozoic Mar 22, 2024
ba870cd
Bump to 3.0.0a1
mesozoic Mar 22, 2024
c035dc4
Remove deprecated `pyairtable.metadata` module
mesozoic Mar 22, 2024
ae41931
Merge pull request #359 from mesozoic/tox
mesozoic Mar 22, 2024
a41e0f6
orm.SingleLinkField to better support prefersSingleRecordLink
mesozoic Mar 14, 2024
a24002d
Updates for ORM model
BAPCon Mar 24, 2024
d4ec23e
Update test_orm_model.py
BAPCon Mar 24, 2024
d971de5
Update testing.py
BAPCon Mar 24, 2024
ff448df
Update model.py
BAPCon Mar 24, 2024
26cab98
Update `orm.model` and tests
BAPCon Mar 24, 2024
64f9341
Updates per review
BAPCon Mar 26, 2024
3b06244
Merge pull request #355 from BAPCon/Testing
mesozoic Mar 28, 2024
f72c792
Model.link_field.populate(instance)
mesozoic Mar 14, 2024
d6b0bfe
SingleLinkField should only retrieve the first record
mesozoic Mar 19, 2024
c5b7fdb
Merge pull request #360 from mesozoic/remove_metadata
mesozoic Mar 28, 2024
a4da1c6
Close missing line in test coverage
mesozoic Mar 28, 2024
0480949
Merge pull request #352 from mesozoic/model_created_time
mesozoic Mar 28, 2024
f944294
Merge pull request #354 from mesozoic/orm_single_link
mesozoic Mar 29, 2024
80c3c98
Run mypy as part of GitHub Actions
mesozoic Mar 29, 2024
3d6da83
Fix missing type annotation
mesozoic Mar 29, 2024
919f57d
Merge pull request #361 from mesozoic/fix_mypy
mesozoic Mar 30, 2024
fade681
Rename return_fields_by_field_id to use_field_ids
mesozoic Apr 1, 2024
1040512
Merge pull request #362 from mesozoic/use_field_ids
mesozoic Apr 2, 2024
d395ca7
Required*Field classes raise exception if a value is empty
mesozoic Mar 14, 2024
9948c80
Simplify missing_value implementation
mesozoic Apr 1, 2024
e969df6
Documentation for Required*Field
mesozoic Apr 1, 2024
75d64d8
Merge pull request #363 from mesozoic/orm_required_fields
mesozoic Apr 15, 2024
f31eef3
Fix integration tests from #363
mesozoic Apr 15, 2024
2b8ea03
Changelog for 3.0
mesozoic Apr 15, 2024
1260d92
Merge pull request #364 from mesozoic/release-3.0.0a1
mesozoic Apr 16, 2024
6ffffd8
Refactor how we access ORM model configuration
mesozoic Apr 17, 2024
54c22c0
Allow Meta to be a dict rather than a class
mesozoic Apr 17, 2024
05c044d
Fix broken reference to pytest.Mark
mesozoic Apr 3, 2024
e84aa69
Merge pull request #367 from mesozoic/pytestmark
mesozoic Apr 19, 2024
513e9b3
Fix gap in test coverage
mesozoic Apr 20, 2024
2631bee
Merge pull request #366 from mesozoic/orm_meta
mesozoic Apr 22, 2024
2590316
Add `memoize` option to Model Meta and methods
mesozoic Mar 29, 2024
8321483
Documentation for ORM memoization
mesozoic Apr 3, 2024
193a533
Fix keyword-only parameter notation
mesozoic Apr 29, 2024
ca27517
Fix type annotations for py312, and run mypy on py38-py312
mesozoic May 2, 2024
348e0ff
DRY up memoization logic, in case it gets more complex later
mesozoic May 6, 2024
87a767f
Fix docs for memoization
mesozoic May 10, 2024
d87ffa8
Merge pull request #369 from mesozoic/orm_memoize
mesozoic May 10, 2024
dba1cb3
Release 3.0.0a2
mesozoic May 10, 2024
be5284e
Merge pull request #370 from mesozoic/release-3.0.0a2
mesozoic May 10, 2024
1d3347a
Address edge cases in `formulas` module
mesozoic May 13, 2024
4907ada
Add support for grant/revoke admin access
mesozoic May 14, 2024
9eba0f3
Merge pull request #371 from mesozoic/fields_as_formulas
mesozoic May 16, 2024
ca4237c
Merge pull request #373 from mesozoic/grant_revoke_admin
mesozoic May 16, 2024
6aac2c6
Move exceptions into pyairtable.exceptions
mesozoic May 16, 2024
63ceffb
Add more to the public API docs
mesozoic May 20, 2024
0f2ed67
comment.mentioned should always be dict, never None
mesozoic May 20, 2024
aae7601
Remove wayward (empty) file
mesozoic May 20, 2024
a75e30f
Fix docs for Workspace.move_base
mesozoic May 20, 2024
7029671
Merge pull request #374 from mesozoic/docs
mesozoic Jun 3, 2024
b5f7c9b
Refine type annotations in orm.fields, models.schema
mesozoic Feb 25, 2024
7e0e89e
First WIP of cli with ORM generator
mesozoic Feb 25, 2024
edac037
Test coverage for orm.generate
mesozoic Feb 26, 2024
2edde65
Test coverage for cli
mesozoic Feb 26, 2024
53a10a3
Create `pyairtable` entry point
mesozoic Jun 3, 2024
1d4ae09
Add `base records` and more documentation
mesozoic Jun 3, 2024
ef1dae6
Add more enterprise features to CLI
mesozoic Jun 4, 2024
0e25b61
Add full command list to `--help`
mesozoic Jun 6, 2024
1811d48
Fix mypy-py38 warning
mesozoic Aug 1, 2024
b41ea4c
make docs
mesozoic Aug 1, 2024
7bc92a3
Add support for undocumented "manualSort" field schema
mesozoic Aug 13, 2024
aeee55c
Add support for "manualSort" field type in ORM
mesozoic Aug 13, 2024
91a34de
Merge pull request #380 from mesozoic/manual_sort
mesozoic Aug 16, 2024
782e822
Track changed field values, only save changed fields
mesozoic Aug 16, 2024
8425506
Track changes to record link lists
mesozoic Aug 16, 2024
54497e3
Merge branch 'main' into auto_orm
mesozoic Aug 18, 2024
d71acec
Merge pull request #376 from mesozoic/auto_orm
mesozoic Aug 18, 2024
c23e632
Fix test failure when AIRTABLE_API_KEY env is set externally
mesozoic Aug 21, 2024
59447ab
Merge pull request #382 from mesozoic/cli_test
mesozoic Aug 21, 2024
8a30d10
Fix failing integration test for manualSort field
mesozoic Aug 21, 2024
d53ecb2
Merge pull request #383 from mesozoic/manual_sort
mesozoic Aug 21, 2024
d71f7e4
Deprecate escape_quotes
mesozoic Aug 20, 2024
35dd180
Merge pull request #384 from mesozoic/escape_quotes
mesozoic Aug 22, 2024
d76534b
Update docs for 3.0 release
mesozoic Aug 18, 2024
f74c7a6
3.0.0a3
mesozoic Aug 22, 2024
ce91a93
Merge pull request #385 from mesozoic/release-3.0.0a3
mesozoic Aug 22, 2024
84c4cde
Add `use_field_ids=` param to Api
mesozoic Aug 25, 2024
b4429d4
Use api.use_field_ids in Table.get
mesozoic Aug 26, 2024
2a2f125
Merge pull request #386 from mesozoic/orm_field_ids
mesozoic Aug 28, 2024
4c87441
Merge pull request #381 from mesozoic/changed_fields
mesozoic Aug 30, 2024
4fc0dce
Model.save() returns SaveResult instead of bool
mesozoic Aug 18, 2024
30ea636
Fix minor docs typo
mesozoic Sep 8, 2024
cacd0a5
SaveResult should be frozen
mesozoic Sep 8, 2024
3dd937d
Export orm.fields.AnyField
mesozoic Sep 8, 2024
ca7c9d6
Merge pull request #387 from mesozoic/saveresult
mesozoic Sep 8, 2024
5c9e79e
Merge pull request #390 from mesozoic/anyfield
mesozoic Sep 8, 2024
454740b
Context manager for mocking API interactions in tests
mesozoic Sep 6, 2024
521538d
Table.upload_attachment
mesozoic Sep 6, 2024
f3d4180
Model.attachments.upload()
mesozoic Sep 6, 2024
7b4ce8f
Clean up typing of ListField, AttachmentsField
mesozoic Sep 8, 2024
fe99881
move ListField params into __init_subclass__
mesozoic Sep 8, 2024
a903bf1
Support content=str in upload_attachment()
mesozoic Sep 8, 2024
7ef6114
Additional tests for attachment edge cases
mesozoic Sep 8, 2024
88db5c9
Fix type bugs with ORM fields that store lists of dicts
mesozoic Sep 9, 2024
813b5fe
Deprecate utils.attachment()
mesozoic Sep 9, 2024
869408c
Fix documentation for 'Upload Attachment'
mesozoic Sep 9, 2024
7bf14ca
Improve documentation of MockAirtable.passthrough
mesozoic Sep 9, 2024
9d42d08
Improve documentation of MockAirtable.add_records
mesozoic Sep 10, 2024
57abe20
A couple fields missed in #352
mesozoic Sep 14, 2024
356ba14
Fail `tox -e coverage` if under 100%
mesozoic Sep 14, 2024
cc10c08
Test coverage for model str->datetime conversion
mesozoic Sep 15, 2024
f058842
Merge pull request #392 from mesozoic/cov_fail_under_100
mesozoic Sep 15, 2024
6a40603
Update docs for MockAirtable
mesozoic Sep 15, 2024
958f7da
Fix lingering docstring typo
mesozoic Sep 16, 2024
61b1ed5
Merge pull request #391 from mesozoic/model_datetimes
mesozoic Sep 16, 2024
d0000c5
Note the breaking change to CreateAttachmentDict
mesozoic Sep 16, 2024
440491a
Fix flaky integration tests
mesozoic Sep 17, 2024
97f2f1b
Merge pull request #389 from mesozoic/upload_attachment
mesozoic Sep 17, 2024
8ae9d6a
Merge remote-tracking branch 'upstream/main' into testing
mesozoic Sep 17, 2024
753c8e9
Clean up pyairtable.testing tests
mesozoic Sep 17, 2024
ba3a124
MockAirtable.set_records
mesozoic Sep 17, 2024
2e1a6fc
Fix docs typo
mesozoic Oct 13, 2024
4fd2172
Merge pull request #388 from mesozoic/testing
mesozoic Oct 13, 2024
4a0a98d
Add Python 3.13 to test suite
mesozoic Oct 21, 2024
7ddbfe3
Remove underscore_attrs_are_private, it breaks 3.13 ¯\_(ツ)_/¯
mesozoic Oct 21, 2024
f0a7127
Add changelog for 2.3.4
mesozoic Oct 21, 2024
526c529
Drop 3.8 support
mesozoic Oct 21, 2024
8264744
Merge pull request #395 from mesozoic/py313
mesozoic Oct 22, 2024
655bc23
pydantic v2: bump-pydantic and fix mypy errors
mesozoic Sep 11, 2024
163f313
pydantic v2: assert_typed_dict, fix missing defaults
mesozoic Sep 14, 2024
4468aa3
pydantic v2: fix remaining missing defaults
mesozoic Oct 22, 2024
54849c6
pydantic v2: parse_obj => model_validate
mesozoic Oct 22, 2024
79a85f1
pydantic v2: update a handful of new names
mesozoic Oct 22, 2024
022f4fc
pydantic v2: fix namespace conflict (model_*)
mesozoic Oct 22, 2024
d95e70a
pydantic v2: update_forward_refs => model_rebuild
mesozoic Oct 22, 2024
c844abc
Remove pydantic v1 from test suite
mesozoic Oct 22, 2024
9c3161d
Remove pydantic compatibility shim
mesozoic Oct 22, 2024
1f2ac18
Note new pydantic dependency as a breaking change
mesozoic Oct 23, 2024
7258fbf
Fix docs for Pydantic v2
mesozoic Oct 23, 2024
3dc0d35
Merge pull request #397 from mesozoic/pydantic_v2
mesozoic Oct 24, 2024
3fe23af
Do not use Session.send() as it skips parts of Session.request
mesozoic Oct 27, 2024
3719d14
Merge pull request #400 from mesozoic/requests_settings
mesozoic Oct 29, 2024
101bd52
Url and UrlBuilder classes
mesozoic Oct 26, 2024
b4af6d2
Api.urls
mesozoic Oct 26, 2024
1c7bce8
Base.urls
mesozoic Oct 26, 2024
90f08a2
Table.urls
mesozoic Oct 26, 2024
30c71a9
Workspace.urls
mesozoic Oct 26, 2024
c70dba7
Enterprise.urls
mesozoic Oct 26, 2024
6779baa
Breaking change to generating URLs
mesozoic Oct 26, 2024
2c91f1e
scripts/find_model_changes.py
mesozoic Nov 2, 2024
29e1a6a
Add missing model fields
mesozoic Nov 2, 2024
e11aab2
Merge pull request #399 from mesozoic/urls
mesozoic Nov 8, 2024
57600d9
WebhookSpecification.options.includes.include_cell_values_in_field_ids
mesozoic Nov 8, 2024
530ce53
Merge pull request #402 from mesozoic/scan_models
mesozoic Nov 9, 2024
067086f
Fix enterprise.info and enterprise.users after new API params
mesozoic Nov 12, 2024
9bf990a
Merge pull request #405 from mesozoic/enterprise_new_params
mesozoic Nov 12, 2024
d4c44be
Scan enterprise models for missing fields
mesozoic Nov 12, 2024
39386eb
Add `descendants=` kwarg to Enterprise.remove_user
mesozoic Nov 12, 2024
62b68b6
Enterprise.create_descendant
mesozoic Nov 12, 2024
8c331aa
Enterprise.move_groups
mesozoic Nov 12, 2024
5bb22bc
Enterprise.move_workspaces
mesozoic Nov 12, 2024
2012986
Merge pull request #407 from mesozoic/enterprise_api
mesozoic Nov 16, 2024
6872e4b
Release 3.0.0
mesozoic Aug 18, 2024
34eb78e
Merge pull request #403 from mesozoic/release-3.0
mesozoic Nov 16, 2024
0a3c92a
Remove all relative imports
mesozoic Nov 28, 2024
fe40c62
Remove circular import in pyairtable.models._base
mesozoic Nov 29, 2024
6bbad32
Clean up import-related noqa directives
mesozoic Nov 29, 2024
de11915
Merge pull request #414 from mesozoic/circular-deps
mesozoic Dec 6, 2024
4fdcc45
Test for #415
mesozoic Dec 6, 2024
07a50ff
Fixes #415
mesozoic Dec 6, 2024
c43dbb4
Add integration test for #415
mesozoic Dec 6, 2024
e300874
Release 3.0.1
mesozoic Dec 6, 2024
40b4a37
Merge pull request #416 from mesozoic/endless_listrecords
mesozoic Dec 6, 2024
dff7582
Allow pickling/unpickling of ChangeTrackingLists
mesozoic Feb 15, 2025
eb1c815
Merge pull request #419 from mesozoic/pickling
mesozoic Feb 15, 2025
608f855
Model.from_ids should respect Meta.use_field_ids
mesozoic Feb 20, 2025
9c1a575
Merge pull request #422 from mesozoic/populate_with_field_ids
mesozoic Feb 22, 2025
cc8e45f
Fix docs search (and a `make docs` error)
mesozoic Feb 25, 2025
8cb3620
Merge pull request #423 from mesozoic/fix_docs_search
mesozoic Feb 26, 2025
91ba838
Release 3.0.2
mesozoic Feb 26, 2025
c9ae213
Merge pull request #424 from mesozoic/release-3.0.2
mesozoic Mar 1, 2025
2fd2b98
Add type-annotated `field_schema()` to ORM fields
mesozoic Mar 16, 2025
5cdb133
Update documentation for ORM fields
mesozoic Mar 16, 2025
7228f22
Reorganize orm.fields and make docs more consistent
mesozoic Mar 16, 2025
f598513
Add warning to UrlBuilder
mesozoic Mar 16, 2025
3e91a57
Document ORM metadata
mesozoic Mar 17, 2025
132332d
Merge pull request #426 from mesozoic/field_schemas
mesozoic Mar 28, 2025
8daf018
Fix flaky integration test
mesozoic Mar 28, 2025
16efaa7
Release 3.1.0
mesozoic Mar 28, 2025
44ec5aa
Clarify webhooks documentation, fixes #425
mesozoic Apr 4, 2025
9b7fb44
Fix typing bug for formulas.FunctionCall; resolves #429
mesozoic Apr 7, 2025
ead9c9c
Update release date of 3.1.0
mesozoic Apr 7, 2025
c1001c1
Merge pull request #428 from mesozoic/release-3.1.0
mesozoic Apr 7, 2025
27c8969
Pass returnFieldsByFieldId everywhere in the ORM; fixes #430
mesozoic Apr 7, 2025
97d91d3
Bump version to 3.1.1
mesozoic Apr 7, 2025
7e28d73
Merge pull request #431 from mesozoic/release-3.1.1
mesozoic Apr 7, 2025
0d83ffb
Add restrictedToEnterpriseMembers, mappedUserLicenseType to schema
mesozoic Jun 21, 2025
39acf44
Add TableSchema.date_dependency
mesozoic Jun 21, 2025
fdd7f90
Add sensitivityLabel and licenseType to model definitions
mesozoic Aug 11, 2025
8d8ffa4
Make find_model_changes syntax easier to read
mesozoic Aug 12, 2025
7b4e387
Fix warnings on updated mypy (1.17)
mesozoic Aug 12, 2025
37c29e1
Merge pull request #434 from mesozoic/add_schema_fields
mesozoic Aug 12, 2025
23dbd5d
Release 3.2.0
mesozoic Aug 15, 2025
7e02ba0
Merge pull request #435 from mesozoic/release-3.2.0
mesozoic Aug 17, 2025
da29d95
Fix deprecation warning from Pydantic 2.11
mesozoic Nov 2, 2025
94760d3
Add count_comments option that passes recordMetadata[]=commentCount
mesozoic Nov 2, 2025
496c4e4
Make recordMetadata options extensible for the future
mesozoic Nov 2, 2025
c1a9a83
Add support for count_comments= in ORM record retrieval
mesozoic Nov 2, 2025
77855b0
Implement new Create Workspace endpoint
mesozoic Nov 2, 2025
265dc7f
Merge pull request #440 from mesozoic/pydantic_deprecation
mesozoic Nov 4, 2025
86ba178
Fix breaking datetime typo in UserGroup test fixture
mesozoic Nov 4, 2025
4239ce6
Add support for Python 3.14, drop support for 3.10
mesozoic Nov 4, 2025
d4872cf
Use py310 for docs and black
mesozoic Nov 4, 2025
b02dee9
Update mypy-py3* env names in tox.ini
mesozoic Nov 4, 2025
e31a930
Merge pull request #443 from mesozoic/py314
mesozoic Nov 4, 2025
92e61e0
Enterprise.create_workspace returns Workspace
mesozoic Nov 4, 2025
9793c4d
Merge pull request #441 from mesozoic/comment_count
mesozoic Nov 5, 2025
1777439
Merge pull request #442 from mesozoic/create_workspace
mesozoic Nov 5, 2025
3044307
Add pyairtable.models.schema.FieldType enum
mesozoic Nov 5, 2025
f71770f
Release 3.3.0
mesozoic Nov 4, 2025
f9a0c21
Merge pull request #444 from mesozoic/field_type_enum
mesozoic Nov 5, 2025
52ac783
Merge pull request #445 from mesozoic/release-3.3.0
mesozoic Nov 5, 2025
5c64da4
Initial version of AGENTS.md
mesozoic Jan 14, 2026
33c5bf9
Bump wheel from 0.38.1 to 0.46.2
dependabot[bot] Jan 22, 2026
8bac23d
Merge pull request #447 from mesozoic/agents.md
mesozoic Feb 7, 2026
1ac61e5
Merge pull request #448 from gtalarico/dependabot/pip/wheel-0.46.2
mesozoic Feb 7, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 10 additions & 7 deletions .github/workflows/test_lint_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
python: ["3.10", "3.11", "3.12", "3.13", "3.14"]

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -42,6 +42,12 @@ jobs:
publish:
runs-on: ubuntu-latest
needs: test

# See https://docs.pypi.org/trusted-publishers/using-a-publisher/
environment: release
permissions:
id-token: write

# Only Publish if it's a tagged commit
if: >-
startsWith(github.ref, 'refs/tags/')
Expand All @@ -50,10 +56,10 @@ jobs:
steps:
- uses: actions/checkout@v3

- name: Set up Python 3.8
- name: Set up Python 3.14
uses: actions/setup-python@v4
with:
python-version: 3.8
python-version: 3.14

- name: Install pypa/build
run: >-
Expand All @@ -70,9 +76,6 @@ jobs:
--wheel
--outdir dist/
.

- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
repository_url: https://upload.pypi.org/legacy/
16 changes: 12 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: local
hooks:
- id: cog
name: cog
language: python
additional_dependencies: [cogapp]
entry: 'python -m cogapp -cr --verbosity=1 --markers="[[[cog]]] [[[out]]] [[[end]]]"'
files: \.py$
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-added-large-files
- id: check-json
Expand All @@ -11,15 +19,15 @@ repos:
- id: fix-byte-order-marker
- id: trailing-whitespace
- repo: https://github.com/pycqa/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort
args: [--profile, black]
- repo: https://github.com/psf/black
rev: 23.1.0
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
rev: 7.0.0
hooks:
- id: flake8
4 changes: 2 additions & 2 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
version: 2

build:
os: ubuntu-22.04
os: ubuntu-24.04
tools:
python: "3.8"
python: "3.10"

sphinx:
configuration: docs/source/conf.py
Expand Down
19 changes: 19 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# AGENTS.md

Read all developer instructions and contribution guidelines in @README.md.

## Testing your changes

When changing code in `pyairtable/`, follow these steps one at a time:

1. `tox -e mypy`
2. `tox -e py314 -- $CHANGED_FILE $CORRESPONDING_TEST_FILE`
3. `tox -e coverage`
4. `make lint`
5. `make docs`
6. `make test`

When changing code in `docs/`, follow these steps instead:

1. `make docs`
2. `make lint`
1 change: 1 addition & 0 deletions MANIFEST.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ include *.rst
include tox.ini
include LICENSE
include README.md
exclude pyairtable/formulas.txt
19 changes: 3 additions & 16 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,12 @@ hooks:
.tox/pre-commit/bin/pre-commit install
.tox/pre-commit/bin/pre-commit install-hooks

.PHONY: release release-test bump
.PHONY: release
release:
make clean
python -m build --sdist --wheel --outdir ./dist
twine upload ./dist/*
@zsh -c "./scripts/release.sh"

release-test:
make clean
python -m build --sdist --wheel --outdir ./dist
twine upload --repository testpypi ./dist/*

bump:
@bash -c "./scripts/bump.sh"

.PHONY: test test-e2e coverage lint format docs clean
.PHONY: test coverage lint format docs clean
test:
tox -- -m 'not integration'

test-e2e:
tox

coverage:
Expand Down
20 changes: 14 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ pip install pyairtable

## Documentation

Read the full documentation on [pyairtable.readthedocs.io](https://pyairtable.readthedocs.io/en/latest/getting-started.html).
Read the full documentation on [pyairtable.readthedocs.io](https://pyairtable.readthedocs.io/en/stable/getting-started.html).

If you're still using airtable-python-wrapper and want to upgrade, read the [migration guide](https://pyairtable.readthedocs.io/en/latest/migrations.html).
If you're still using airtable-python-wrapper and want to upgrade, read the [migration guide](https://pyairtable.readthedocs.io/en/stable/migrations.html).

## Contributing

Expand All @@ -29,8 +29,14 @@ Everyone who has an idea or suggestion is welcome to contribute! As maintainers,
If it's your first time working on this library, clone the repo, set up pre-commit hooks, and make sure you can run tests (and they pass). If that doesn't work out of the box, please check your local development environment before filing an issue.

```sh
% make setup
% make test
make setup
make test
```

For a quick test run (~15s after the environments are created) use:

```sh
tox -e mypy && tox -e coverage
```

### Reporting a bug
Expand All @@ -50,8 +56,10 @@ Anyone who uses this library is welcome to [submit a pull request](https://githu

1. Public functions/methods have docstrings and type annotations.
2. New functionality is accompanied by clear, descriptive unit tests.
3. You can run `make test && make docs` successfully.
4. You have [signed your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).
3. The library maintains 100% test coverage.
4. You can run `make test && make docs` successfully.
5. No backwards-incompatible changes (unless discussed in an existing issue).
6. You have [signed your commits](https://docs.github.com/en/authentication/managing-commit-signature-verification/about-commit-signature-verification).

If you want to discuss an idea you're working on but haven't yet finished all of the above, please [open a draft pull request](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests#draft-pull-requests). That will be a clear signal that you're not asking to merge your code (yet) and are just looking for discussion or feedback.

Expand Down
55 changes: 46 additions & 9 deletions docs/source/_substitutions.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
.. |arg_base_id| replace:: An Airtable base id.
.. |arg_base_id| replace:: An Airtable base ID.

.. |arg_record_id| replace:: An Airtable record id.
.. |arg_record_id| replace:: An Airtable record ID.

.. |arg_table_id_or_name| replace:: An Airtable table ID or name.
Table name should be unencoded, as shown on browser.

.. |kwarg_view| replace:: The name or ID of a view.
If set, only the records in that view will be returned.
Expand Down Expand Up @@ -32,8 +35,7 @@
.. |kwarg_formula| replace:: An Airtable formula. The formula will be evaluated for each record, and if the result
is none of ``0``, ``false``, ``""``, ``NaN``, ``[]``, or ``#Error!`` the record will be included
in the response. If combined with view, only records in that view which satisfy the
formula will be returned. For example, to only include records where
``COLUMN_A`` isn't empty, pass in ``formula="{COLUMN_A}"``.
formula will be returned. Read more at :doc:`formulas`.

.. |kwarg_typecast| replace:: The Airtable API will perform best-effort
automatic data conversion from string values.
Expand All @@ -46,17 +48,52 @@

.. |kwarg_user_locale| replace:: The user locale that should be used to format
dates when using `string` as the `cell_format`. See
https://support.airtable.com/hc/en-us/articles/220340268-Supported-locale-modifiers-for-SET-LOCALE
`Supported SET_LOCALE modifiers <https://support.airtable.com/docs/supported-locale-modifiers-for-set-locale>`__
for valid values.

.. |kwarg_time_zone| replace:: The time zone that should be used to format dates
when using `string` as the `cell_format`. See
https://support.airtable.com/hc/en-us/articles/216141558-Supported-timezones-for-SET-TIMEZONE
`Supported SET_TIMEZONE timezones <https://support.airtable.com/docs/supported-timezones-for-set-timezone>`__
for valid values.

.. |kwarg_replace| replace:: If ``True``, record is replaced in its entirety
by provided fields; if a field is not included its value will
bet set to null. If False, only provided fields are updated.
bet set to null. If ``False``, only provided fields are updated.

.. |kwarg_use_field_ids| replace:: An optional boolean value that lets you return field objects where the
key is the field id. This defaults to ``False``, which returns field objects where the key is the field name.
This behavior can be overridden by passing ``use_field_ids=True`` to :class:`~pyairtable.Api`.

.. |kwarg_count_comments| replace:: If ``True``, the API will include a ``commentCount``
field for each record. This allows you to see which records have comments without fetching
each record individually. Defaults to ``False``.

.. |kwarg_force_metadata| replace::
By default, this method will only fetch information from the API if it has not been cached.
If called with ``force=True`` it will always call the API, and will overwrite any cached values.

.. |kwarg_validate_metadata| replace::
If ``False``, will create an object without validating the ID/name provided.
If ``True``, will fetch information from the metadata API and validate the ID/name exists,
raising ``KeyError`` if it does not.

.. |kwarg_orm_fetch| replace::
If ``True``, records will be fetched and field values will be
updated. If ``False``, new instances are created with the provided IDs,
but field values are unset.

.. |kwarg_orm_memoize| replace::
If ``True``, any objects created will be memoized for future reuse.
If ``False``, objects created will *not* be memoized.
The default behavior is defined on the :class:`~pyairtable.orm.Model` subclass.

.. |kwarg_orm_lazy| replace::
If ``True``, this field will return empty objects with only IDs;
call :meth:`~pyairtable.orm.Model.fetch` to retrieve values.

.. |kwarg_permission_level| replace::
See `application permission levels <https://airtable.com/developers/web/api/model/application-permission-levels>`__.

.. |warn| unicode:: U+26A0 .. WARNING SIGN

.. |kwarg_return_fields_by_field_id| replace:: An optional boolean value that lets you return field objects where the
key is the field id. This defaults to `false`, which returns field objects where the key is the field name.
.. |enterprise_only| replace:: |warn| This feature is only available on Enterprise billing plans.
74 changes: 66 additions & 8 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ API Reference
=============


Module: pyairtable
API: pyairtable
*******************************

.. autoclass:: pyairtable.Api
Expand All @@ -18,48 +18,106 @@ Module: pyairtable
.. autoclass:: pyairtable.Table
:members:

.. autoclass:: pyairtable.Workspace
:members:

.. autoclass:: pyairtable.Enterprise
:members:

.. autofunction:: pyairtable.retry_strategy


Module: pyairtable.api.types
API: pyairtable.api.enterprise
*******************************

.. automodule:: pyairtable.api.enterprise
:members:
:exclude-members: Enterprise
:inherited-members: BaseModel, AirtableModel


API: pyairtable.api.types
*******************************

.. automodule:: pyairtable.api.types
:members:


Module: pyairtable.formulas
API: pyairtable.exceptions
*******************************

.. automodule:: pyairtable.exceptions
:members:


API: pyairtable.formulas
*******************************

.. automodule:: pyairtable.formulas
:members:


Module: pyairtable.models
API: pyairtable.models
*******************************

.. automodule:: pyairtable.models
:members:
:inherited-members: BaseModel, AirtableModel


API: pyairtable.models.comment
-------------------------------

.. automodule:: pyairtable.models.comment
:members:
:exclude-members: Comment
:inherited-members: BaseModel, AirtableModel

Module: pyairtable.orm

API: pyairtable.models.schema
-------------------------------

.. automodule:: pyairtable.models.schema
:members:
:inherited-members: BaseModel, AirtableModel


API: pyairtable.models.webhook
-------------------------------

.. automodule:: pyairtable.models.webhook
:members:
:exclude-members: Webhook, WebhookNotification, WebhookPayload
:inherited-members: BaseModel, AirtableModel


API: pyairtable.orm
*******************************

.. autoclass:: pyairtable.orm.Model
:members:

.. autoclass:: pyairtable.orm.SaveResult
:members:


Module: pyairtable.orm.fields
API: pyairtable.orm.fields
*******************************

.. automodule:: pyairtable.orm.fields
:members:
:member-order: bysource
:exclude-members: valid_types, contains_type
:no-inherited-members:


Module: pyairtable.utils
API: pyairtable.testing
*******************************

.. automodule:: pyairtable.testing
:members:


API: pyairtable.utils
*******************************

.. automodule:: pyairtable.utils
Expand Down
Loading