provenaclient.clients.search_client

Created Date: Thursday May 30th 2024 +1000 Author: Peter Baker —– Last Modified: Thursday May 30th 2024 10:17:36 am +1000 Modified By: Peter Baker —– Description: Search API L2 Client. —– HISTORY: Date By Comments ———- — ———————————————————

Classes

SearchEndpoints

An ENUM containing the datastore-api

SearchClient

This class interface just captures that the client has an instantiated auth

Module Contents

class provenaclient.clients.search_client.SearchEndpoints[source]

Bases: str, enum.Enum

An ENUM containing the datastore-api endpoints.

SEARCH_REGISTRY: str = '/search/entity-registry'
class provenaclient.clients.search_client.SearchClient(auth: provenaclient.clients.client_helpers.AuthManager, config: provenaclient.clients.client_helpers.Config)[source]

Bases: provenaclient.clients.client_helpers.ClientService

This class interface just captures that the client has an instantiated auth manager which allows for helper functions abstracted for L2 clients.

_auth
_config
_build_endpoint(endpoint: SearchEndpoints) str[source]
async search_registry(query: str, limit: provenaclient.clients.client_helpers.Optional[int], subtype_filter: provenaclient.clients.client_helpers.Optional[provenaclient.clients.client_helpers.ItemSubType]) ProvenaInterfaces.SearchAPI.QueryResults[source]

Searches registry using search API for given query, limit and subtype.

Parameters:
  • query (str) – The query

  • limit (Optional[int]) – The record result limit

  • subtype_filter (Optional[ItemSubType]) – The subtype to filter if desired

Raises:

e – Generic exceptions as usual

Returns:

The results, not loaded.

Return type:

QueryResults