nildb.builder_client

Builder NIL DB client implementation.

class NilDbBuilderClientOptions(*, about: ReadAboutNodeResponse, base_url: str)[source]

Bases: NilDbBaseClientOptions

Options for NIL DB builder client.

class NilDbBuilderClient(options: NilDbBuilderClientOptions)[source]

Bases: NilDbBaseClient

Builder NIL DB client implementation.

async register(body: RegisterBuilderRequest) None[source]

Register a new builder.

async read_profile(token: str) ReadBuilderProfileResponse[source]

Retrieve the authenticated builder’s profile information.

async update_profile(token: str, body: UpdateBuilderProfileRequest) None[source]

Update the authenticated builder’s profile information.

async delete_builder(token: str) None[source]

Delete the authenticated builder and all associated resources.

async create_collection(token: str, body: CreateCollectionRequest) None[source]

Create a new collection for data validation.

async read_collections(token: str) ListCollectionsResponse[source]

List all collections owned by the authenticated builder.

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

Delete a collection by id and all associated data.

async read_collection(token: str, collection: str) ReadCollectionMetadataResponse[source]

Retrieve a collection by id including metadata.

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

Create an index on a collection.

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

Drop an index from a collection.

async get_queries(token: str) ReadQueriesResponse[source]

List all queries owned by the authenticated builder.

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

Retrieve a query by id.

async create_query(token: str, body: CreateQueryRequest) None[source]

Create a new MongoDB aggregation query with variable substitution.

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

Delete a query by id.

async run_query(token: str, body: RunQueryRequest) RunQueryResponse[source]

Execute a query with variable substitution.

async read_query_run_results(token: str, run: str) ReadQueryRunByIdResponse[source]

Retrieve the status and results of a background query job.

async create_standard_data(token: str, body: CreateStandardDataRequest) CreateDataResponse[source]

Upload standard data records to a schema-validated collection.

async find_data(token: str, body: FindDataRequest) FindDataResponse[source]

Search for data matching the provided filter.

async update_data(token: str, body: UpdateDataRequest) UpdateDataResponse[source]

Update data records matching the provided filter.

async delete_data(token: str, body: DeleteDataRequest) DeleteDataResponse[source]

Delete data records matching the provided filter.

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

Remove all data from a collection.

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

Retrieve the most recent data records from a collection.

async create_nil_db_builder_client(base_url: str) NilDbBuilderClient[source]

Create a NIL DB builder client.

Parameters:

base_url – Base URL for the NIL DB service

Returns:

NIL DB builder client