Skip to main content

Python API for Nebulon

This is an API client for Nebulon ON for Python 3 and allows working with Nebulon nPods just like with the Nebulon ON web user interface but in a scriptable form.

Installation

The Nebulon Python SDK client is available through the Python Package Index with the name nebpyclient, but can also be installed from source.

IMPORTANT: Please review the changelog to transition from version 1.x of the nebpyclient to version 2.x.

Python Package Index

pip install nebpyclient

Or

python3 -m pip install nebpyclient

Installation from Source Code

mkdir nebulon
cd nebulon
git clone https://github.com/nebulon/nebpyclient.git
cd nebpyclient
python3 setup.py install

To build the HTML documentation from source:

cd docs/
make html

Using the API

To use this API, instantiate a NebPyClient object with username and password. You can then use its methods to query state, and if a nPod is reachable from where the script is being run modify the system. A simple script to display the names of all of the pods in your organization along with a count of the volumes in them would be:

from nebpyclient import NebPyClient

client = NebPyClient("username", "password")

npod_list = client.get_npods()
for npod in npod_list.items:
    print(f"nPod {npod.name} has {npod.volume_count} volumes")

An example to create a 2 TiB volume called volume name on an existing nPod with the name NPod Name would be:

from nebpyclient import NebPyClient
from nebpyclient import NPodFilter, StringFilter

client = NebPyClient("username", "password")

# find the nPod by name
npod_list = client.get_npods(
    npod_filter=NPodFilter(
        name=StringFilter(
            equals="NPod Name"       
        )   
    )
)

if npod_list.filtered_count == 0:
    # nPod with the name "NPod Name" not found
    exit(-1)

npod_uuid = npod_list.items[0].uuid
volume_name="volume name"
volume_size_bytes = 2 * 1024 * 1024 * 1024 * 1024 # 2 TiB

# create the volume
client.create_volume(
    name=volume_name,
    size_bytes=volume_size_bytes,
    npod_uuid=npod_uuid
)

Full documentation on the API is available in the docs directory. Some functions have comments that describe functions and methods and are visible in modern Python IDEs.

Please review the current version of the documentation for more details.

Metadata

Release files for nebpyclient 2.0.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nebpyclient 2.0.10
File Size Uploaded Provenance Actions
nebpyclient-2.0.10.tar.gz 117.6 kB Without provenance Details for nebpyclient-2.0.10.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nebpyclient 2.0.10
File Interpreter ABI Platform Actions
nebpyclient-2.0.10-py3-none-any.whl Python 3 none any Details for nebpyclient-2.0.10-py3-none-any.whl

Total release size: 274.2 kB

Release files / nebpyclient-2.0.10.tar.gz

Download URL nebpyclient-2.0.10.tar.gz
Size 117.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7c8feab223898d41f4399c2f65619695081968371d9ef492d55c3b69966fae0d
BLAKE2b-256 checksum
How to use checksums
2cd8444a487079f5b7da5f33af43318c59ca968074159a75c542e5f08cdaf47f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.11

Release files / nebpyclient-2.0.10-py3-none-any.whl

Download URL nebpyclient-2.0.10-py3-none-any.whl
Size 156.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
33503f38be2e1541cbdfc2aa319d3ba67e58f748a55e22d87f03fe2c1b1642d4
BLAKE2b-256 checksum
How to use checksums
3daaf0a90fe8b19eb4363cc670d52f27a83b0af56128204c62adc9a2db267314
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.0 CPython/3.9.11

Security for nebpyclient 2.0.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page