Skip to content

Abstract the idea of a Client to a trait or traits #728

@gadomski

Description

@gadomski

Our backends and our clients are all doing more-or-less the same stuff ... we should abstract those behaviors to a trait or traits.

Initial thoughts (could change, all async):

  • SearchClient: search is only required method, item, items, etc all default to using search
  • CollectionSearchClient: same thing but for collections
  • TransactionClient: add/create/upsert items and collections (do we need to separate into a CollectionTransactionClient?)
  • ArrowSearchClient: search_to_arrow iterates over record batches, and provides a default impl of search that does a conversion (like the DuckDB client does now)

We'll want to update several places to use these traits:

The traits should live in stac-api.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions