Skip to main content
The nelieo-nsp package is the official Python SDK for the Nelieo State Protocol. It gives you a fully async, type-safe interface for reading application state, executing actions, and streaming real-time changes from any process the NSP daemon is tracking — whether that process is a browser tab, a .NET desktop app, or a JVM service.

Installation

Install the package with pip:
nelieo-nsp requires Python 3.11 or later. All dependencies are installed automatically — you do not need to install httpx, pydantic, websockets, or loguru separately.

Requirements

Package Structure

The importable package is nelieo_nsp. Its internal layout is:
You only need to import from nelieo_nsp directly — everything public is re-exported from __init__.py.

Exported Symbols

Import any of these directly from nelieo_nsp:

Environment Variable Configuration

You can configure the SDK entirely through environment variables, avoiding hardcoded credentials in source code:
When NSP_API_KEY is set, you can construct NSPClient() with no arguments:

Quick Reference

The following example demonstrates the complete usage pattern from connection to streaming:

Next Steps

NSPClient

Manage connections, list apps, get state, execute actions, and attach sessions.

NSPSession

Read state, execute actions, stream changes, and wait for conditions.

CLR Helpers

Read .NET fields, invoke methods, and walk the CLR heap for .NET apps.

JVM Helpers

Access Java fields and invoke methods via JNI reflection for JVM apps.

Streaming

Subscribe to WebSocket state-change events in real time.

Error Handling

Understand every exception the SDK can raise and how to recover.