Developer Guide
Developer Guide
Section titled “Developer Guide”As a software developer, you create packages — containerized building blocks that wrap your algorithms and tools for use in Brane workflows. Packages can be written in any programming language.
What You’ll Learn
Section titled “What You’ll Learn”- Install the CLI — Get the Brane command-line tool
- Your First Package — Build a simple hello-world package
- Package Inputs — Handle function arguments and multiple functions
- Datasets — Work with datasets and intermediate results
How Packages Work
Section titled “How Packages Work”A Brane package consists of:
- Your code — Any language, any dependencies
- A
container.ymlfile — Describes the package’s functions, inputs, and outputs - A Docker container — Built automatically by the Brane CLI
When you build a package, Brane creates a Docker image containing your code. At runtime, the framework launches this container on the appropriate worker node, passes inputs via environment variables, and reads outputs from stdout (formatted as YAML).
Package Lifecycle
Section titled “Package Lifecycle”Write Code --> Define container.yml --> Build --> Test --> Push to Instance- Write your algorithm in any language
- Define the package interface in
container.yml - Build the package:
brane package build ./container.yml - Test locally:
brane package test <package_name> - Push to a Brane instance:
brane package push <package_name>
Supported Languages
Section titled “Supported Languages”Brane packages can use any language that runs on Ubuntu Linux:
- Python — Most common for data science packages
- R — Statistical analysis
- Bash — Simple utilities and scripts
- Rust, Go, C/C++ — High-performance computing
- Java, JavaScript — Enterprise integrations
For interpreted languages, include the interpreter in the container. For compiled languages, build the binary and only package the executable.