Skip to main content

Barbara API SDK for Python

This article refers to SDK version v0.5.0. The current SDK version is N/A.

Overview

The Barbara API SDK for Python is the official client for the Barbara API: typed, synchronous and asynchronous, covering nodes, clusters, applications, and models. It lets you manage your Barbara fleet from your own scripts and services instead of clicking through the Barbara Panel by hand.

Package on PyPI · Source on GitHub

pip install barbara-api-sdk

This section of Academy has three kinds of material. Pick the one that matches what you need right now.

Guides

Step-by-step articles that teach one task at a time, starting from your first authenticated call.

GuideDescription
Getting startedInstall the SDK, authenticate, and run your first calls: list your nodes and read live telemetry.
Node identity & tagsName, location, tags, groups, and automatic disk-pressure safety config.
Node networkingEthernet, WiFi, Mobile, and VLAN interfaces, hostname, VPN, Proxy, Standalone Mode, IPTables, and NTP servers.
Node secretsCreate, list, and delete secrets on a node or cluster.
Docker credentials & volumesRegister registry credentials and manage docker volumes on a node.
Marketplace app deploymentDeploy a Marketplace application to a node: services, ports, and checking on the result.
Deploying your own appsRegister a user application, upload a version, and deploy it.
Model deploymentRegister a model, upload a version, and deploy it to run inference at the edge.
Workload lifecycleStart, stop, read logs, and check the status of an already-deployed workload.
App configurationNode-level, workload-level, and reusable configuration, and when to use which.
Clusters & stacksCreate a cluster, manage node membership, and deploy a stack across every member.
AlertsList active alerts, acknowledge them, and inspect the events behind one.

Examples

Full walkthroughs of the runnable scripts shipped in the SDK's examples/ directory: what each script does, how to run it, and how to extend it.

ExampleDescription
Hello WorldThe smallest working script: authenticate and list your nodes.
Node info & telemetryRead a node's configuration and latest telemetry.
Barbara Core updatesCheck nodes for an outdated Barbara Core, optionally update them.
Network auditReport a fleet's network configuration in one shot.
Clone a nodeClone a node's workloads, configuration, and volumes onto another node.
Clone toolBack up a node to disk, restore it onto a batch of targets, or clean it.
Deployment dashboardA live terminal dashboard checking a fleet against a target state.

Reference

Start at the Reference overview for domain concepts, authentication, and a full usage walkthrough, or jump straight to a resource. Every method, parameter, and return type is kept in sync with the SDK's docstrings.

ResourceDescription
client.nodesNode lifecycle, secrets, app configuration, docker credentials, and actions (reboot, provision, ...)
client.nodes.networkPhysical interfaces, VLANs, hostname, VPN, Proxy, Standalone Mode, IPTables, and NTP servers
client.nodes.workloadsApplications deployed on a node
client.clustersCluster lifecycle, global secrets, global configuration, and docker credentials
client.clusters.workloadsApplications deployed across a cluster
client.applicationsApplication catalog and versions
client.modelsModel catalog and versions
client.configsReusable Config Repository documents
client.groupsNode groups
client.usersCompany users (read-only)
client.alertsAlerts and alert events

Plus the client, config & auth, exceptions, and models pages. For the underlying HTTP API itself, see the API Specification.