Skip to content

Client

Entry point for connecting to a NimbusImage server.

nimbusimage.client.NimbusClient

Authenticated session to a NimbusImage server.

Create via ni.connect(): client = ni.connect(api_url, token=...) client = ni.connect(api_url, username=..., password=...) client = ni.connect() # from NI_API_URL + NI_TOKEN env vars

girder property

Raw girder_client.GirderClient escape hatch.

dataset(dataset_id=None, *, name=None)

Get a Dataset object.

Parameters:

Name Type Description Default
dataset_id str | None

The folder ID of the dataset.

None
name str | None

Look up dataset by name (searches all accessible folders).

None

Returns:

Type Description
Dataset

Dataset object (lazy — no HTTP call until data is accessed).

list_datasets()

List all accessible datasets.

Discovers datasets via dataset_views, which link datasets to collections. Each unique dataset folder is returned once.

Returns:

Type Description
list[dict]

List of dataset folder dicts with _id, name, meta.

list_projects()

List all accessible projects.

create_project(name, description='')

Create a new project.

project(project_id)

Get a Project by ID.

list_collections(folder_id=None)

List collections (configurations).

In NimbusImage, "collections" and "configurations" are the same thing. The backend uses /upenn_collection endpoints. The UI calls them "collections".

Parameters:

Name Type Description Default
folder_id str | None

Filter by parent folder. If None, lists collections in the current user's Private folder.

None

Returns:

Type Description
list[Collection]

List of Collection objects.

collection(collection_id)

Get a Collection (configuration) by ID.

list_workers()

List available worker Docker images on the server.

Returns:

Type Description
dict[str, dict]

Dict mapping image name (e.g., 'myworker:latest')

dict[str, dict]

to a dict of Docker labels:

dict[str, dict]
  • isAnnotationWorker: 'true' if it creates annotations
dict[str, dict]
  • isPropertyWorker: 'true' if it computes properties
dict[str, dict]
  • interfaceName: display name
dict[str, dict]
  • description: worker description
dict[str, dict]
  • annotationShape: shape it produces (point/polygon/...)

get_worker_interface(image, request_if_missing=True)

Get the parameter interface for a worker image.

Parameters:

Name Type Description Default
image str

Docker image name (e.g., 'myworker:latest').

required
request_if_missing bool

If True and no cached interface exists, request the worker to register its interface and wait.

True

Returns:

Type Description
dict | None

Dict mapping parameter IDs to their definitions, or None

dict | None

if no interface is available.