Skip to main content
The Nodepick Python SDK gives you a clean, Pythonic interface for provisioning and managing isolated Linux kernel nodes directly from your code. Whether you’re spinning up ephemeral compute for a CI pipeline, a data processing job, or an AI workload, the SDK handles the API calls so you can focus on what runs on the node.

Installation

Install the nodepick package from PyPI using pip:

Initialization

Import the nodepick class and instantiate a client with your API key:
Avoid hardcoding your API key in source files. Instead, read it from an environment variable:
Set the variable in your shell before running your script:

Core Operations

1

Create a Node

Call create_node() to provision a new Linux kernel node. The method returns a dictionary containing the node’s id, status, and other metadata:
2

Get Node Details

Once provisioning is complete, retrieve the node’s full details — including its IP address and SSH connection info — using get_node_details():
3

Delete a Node

When you’re finished with a node, delete it to immediately stop billing:

Using the Context Manager

The nodepick client supports Python’s context manager protocol, which automatically calls client.close() when the with block exits — even if an exception is raised.
The context manager calls client.close() automatically when the with block exits. You do not need to call it manually when using this pattern.

Complete Workflow Example

The following script demonstrates a full end-to-end lifecycle: creating a node, waiting for it to be ready, retrieving its connection details, performing work, and then cleaning up.
Always delete nodes as soon as your workload completes. Nodepick bills per second from the moment a node is created until it is deleted. Leaving nodes running unnecessarily will result in unexpected charges.