builder

SecretVault builder client for managing SecretVaults with automatic handling of concealed data.

class SecretVaultBuilderOptions(*, keypair: Keypair, clients: List[NilDbBuilderClient], key: Any | None = None, nilauth_client: NilauthClient)[source]

Bases: SecretVaultBaseOptions[NilDbBuilderClient]

Options for SecretVault builder client.

nilauth_client: NilauthClient
class SecretVaultBuilderClient(options: SecretVaultBuilderOptions)[source]

Bases: SecretVaultBaseClient[NilDbBuilderClient]

Client for builders to manage their SecretVaults with automatic handling of concealed data if configured.

async classmethod from_options(keypair: Keypair, urls: Dict[str, List[str]], blindfold: BlindfoldFactoryConfig | None = None) SecretVaultBuilderClient[source]

Creates and initializes a new SecretVaultBuilderClient instance.

Parameters:
  • keypair – The keypair for authentication

  • urls – Dictionary with ‘chain’, ‘auth’, and ‘dbs’ URLs

  • blindfold – Optional blindfold configuration for encryption

Returns:

SecretVaultBuilderClient instance

property root_token: NucTokenEnvelope

Get the root token.

async refresh_root_token() None[source]

Fetches a new root NUC token from the configured nilAuth server.

async subscription_status() Dict[str, Any][source]

Checks subscription status by the builder’s Did.

async register(body: RegisterBuilderRequest) Dict[Did, None][source]

Registers the builder with all nodes in the cluster.

async read_profile() ReadBuilderProfileResponse[source]

Reads the builder’s profile from the cluster.

async update_builder_profile(body: UpdateBuilderProfileRequest) Dict[Did, None][source]

Updates the builder’s profile on all nodes.

async delete_builder() Dict[Did, None][source]

Deletes the builder from all nodes.

async create_collection(body: CreateCollectionRequest) Dict[Did, None][source]

Creates a collection on all nodes.

async read_collections() ListCollectionsResponse[source]

Reads collections from the cluster.

async read_collection(collection: str) ReadCollectionMetadataResponse[source]

Reads collection metadata from the cluster.

async delete_collection(collection: str) Dict[Did, None][source]

Deletes a collection from all nodes.

async create_collection_index(collection: str, body: CreateCollectionIndexRequest) Dict[Did, None][source]

Creates a collection index on all nodes.

async drop_collection_index(collection: str, index: str) Dict[Did, None][source]

Drops a collection index from all nodes.

async create_standard_data(body: CreateStandardDataRequest, delegation: str | None = None) Dict[Did, CreateDataResponse][source]

Creates standard data on all nodes.

async get_queries() Dict[Did, ReadQueriesResponse][source]

Gets queries from the cluster.

async get_query(query: str) Dict[Did, ReadQueryResponse][source]

Gets a specific query from the cluster.

async create_query(body: CreateQueryRequest) Dict[Did, None][source]

Creates a query on all nodes.

async delete_query(query: str) Dict[Did, None][source]

Deletes a query from all nodes.

async run_query(body: RunQueryRequest) Dict[Did, RunQueryResponse][source]

Runs a query on all nodes.

async read_query_run_results(run_id: str) Dict[Did, ReadQueryRunByIdResponse][source]

Reads query run results from the cluster.

async find_data(body: FindDataRequest) FindDataResponse[source]

Finds data in the cluster.

async update_data(body: UpdateDataRequest) Dict[Did, UpdateDataResponse][source]

Updates data on all nodes.

async delete_data(body: DeleteDataRequest) Dict[Did, DeleteDataResponse][source]

Deletes data from all nodes.

async flush_data(collection: str) Dict[Did, None][source]

Flushes data from all nodes.

async tail_data(collection: str, limit: int = 10) TailDataResponse[source]

Tails data from the cluster.

async __aenter__()[source]
async __aexit__(exc_type, exc_val, exc_tb)[source]