Welcome to nboxโ€™s documentation!ยถ

Good documentation is always a work in silence.

Hi, there ๐Ÿ‘พ!

nbox is SDK for NimbleBox.ai, it provides built in access to all the APIs and packages them in the most user friendly manner. Writing MLOps pipelines from scratch can be a daunting task and this is a breakdown of how nbox works. Find the complete open source code on github. Install the package from pipy:

pip install nbox

For convinience you should add nbox to your path by setting up an alias. Throughout the rest of the documentation we will be using nbx as the CLI:

# go to your .bashrc or .zshrc and add
alias nbx="python3 -m nbox"

In order to effectively use this package, you must have a password set. You can get it by going to Profile โ†’ Reset Password.

When loading nbox for the first time, it will prompt you the username and password and create a secrets file at ~/.nbx/secrets.json. This file then contains all the information that you donโ€™t have to fetch manually again.


The objective is to make using ML ๐Ÿฅถ. For this it is paramount that APIs be deeper, user functions be kept to minimum and most relavant. This documentation contains the full spec of everything, but hereโ€™s all the APIs you need to know:

โ”œโ”€โ”€ Operators         # How jobs are combinations of operators
โ”‚ย   โ”œโ”€โ”€ from_serving  # latch to an existing deployment
โ”‚ย   โ””โ”€โ”€ __call__
โ”œโ”€โ”€ Jobs              # For controlling all your jobs
โ”‚ย   โ”œโ”€โ”€ logs          # stream logs right on your terminal
โ”‚ย   โ””โ”€โ”€ trigger       # manually trigger a job
โ””โ”€โ”€ Instance
   โ”œโ”€โ”€ remote         # Run any shell command on the instance
   โ”œโ”€โ”€ ls             # List files in a folder
   โ””โ”€โ”€ mv             # Move files to and from NBX-Build

Though the underlying framework will keep on increasing we already use Protobufs, gRPC along with auto generating code files.


To provide zero differences between using CLI and packages, we use python-fire that makes CLIs using python objects. Example, letโ€™s just say you want to turn off any instance

# In case of script
Instance(i = "nbox-dev", workspace_id = "99mhf3h").stop()

# In case of CLI
nbx build --i="nbox-dev" --workspace_id="99mhf3h" stop


Or you can directly SSH into instances (Read more aout).

nbx tunnel 8000 --i="nbox-dev"


Or you can see the status by making GET calls from CLI along with jq:

$ nbx get "workspace/99mhf3h/projects/2892" | tail -n 1 | jq
> {
   "data": {
      "auto_backup": null,
      "auto_shutdown_time": -1,
      "autoshutdown": false,
      "clone_access": false,
      "created_time": "1647858175.0",
      "creator": "Bruce Wayne",
      "dedicated_hw": false,
      "editor": "csv2",

If you want to see something be added or found bug, raise an issue.

We will contibue expanding more and more services and building blocks for your pipelines. Hope you enjoy this.