Skip to content

Add operation namespaces (client.records, client.query, client.tables)#102

Merged
tpellissier-msft merged 3 commits intomainfrom
feature/operation-namespaces-clean
Feb 19, 2026
Merged

Add operation namespaces (client.records, client.query, client.tables)#102
tpellissier-msft merged 3 commits intomainfrom
feature/operation-namespaces-clean

Conversation

@tpellissier-msft
Copy link
Contributor

@tpellissier-msft tpellissier-msft commented Feb 12, 2026

Summary

  • Introduces three operation namespaces: client.records, client.query, client.tables
  • New methods use cleaner, more Pythonic signatures: keyword-only params, @overload for single/bulk, shorter param names
  • All 11 existing flat methods (client.create(), client.get(), etc.) continue to work unchanged with DeprecationWarning pointing to the new equivalents
  • No OperationResult wrapper — all methods return plain Python types (str, list[str], dict, None)
  • 40 new unit tests (75 total, all passing)

Key API changes

New method Returns Old equivalent
records.create(table, dict) str (single GUID) client.create() returned list[str]
records.create(table, list[dict]) list[str] same
records.update(table, id, changes) None client.update()
records.delete(table, id) None client.delete()
records.get(table, id) dict client.get(record_id=...)
query.get(table, *, filter, select, ...) Iterable[list[dict]] client.get(filter=...)
query.sql(sql) list[dict] client.query_sql()
tables.create(table, cols, *, solution=) dict client.create_table(solution_unique_name=)
tables.get(table) dict | None client.get_table_info()
tables.list() list[dict] client.list_tables()
tables.add_columns(table, cols) list[str] client.create_columns()
tables.remove_columns(table, cols) list[str] client.delete_columns()

Backward compatibility

All existing code continues to work. Deprecated methods emit warnings:

DeprecationWarning: client.create() is deprecated. Use client.records.create() instead.

Test plan

  • 12 tests for RecordOperations (create single/bulk, update single/broadcast/paired, delete single/bulk/sequential/empty, get)
  • 5 tests for QueryOperations (paginated get, param passthrough, sql, empty sql)
  • 9 tests for TableOperations (create, delete, get, get-none, list, add_columns, remove_columns)
  • 14 tests for deprecated method delegation (warning emission + correct delegation + return shims)
  • All 35 pre-existing tests still pass

🤖 Generated with Claude Code

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants