Skip to main content
nu

nu

The interaction primitive.

Python PyPI Downloads License

Discord X

About · Examples · Install · Docs · Tutorial

nu is a Python programming model for apps that span many systems. Every resource is a Ref, wherever it lives: a database row, a UI widget, an LLM endpoint, a remote worker. Interactions with Refs are first-class primitives you compose into programs.

About

Most app code is not about values, it is about moving them between systems: a database, a browser, a worker, an LLM. nu makes that interaction the primitive.

  • Ref: a name for a value, wherever it lives. A KV slot, a text block in the browser, an LLM endpoint.
  • Interaction: what you do with a Ref. Read, write, branch, iterate, compose.
  • Fabric: binds Refs to a real system. Bind as many as you need, they all speak the same primitive.

Setting a text block in the browser is the same interaction as setting a KV slot.

Examples

A counter that survives restarts:

import nu
import nustd


class DB(nu.Shape):
    hits = nustd.kv.IntRef.slot()


op = DB.hits.init(0) >> DB.hits.inc() >> nu.print(nu.str(DB.hits))

app = nu.With(
    nustd.kv.rocksdb_navigator(".db"),
    body=nustd.kv.auto_flow_atomic(op),
)

nu.run(app)  # 1, then 2 on the next run, then 3

A live browser UI, same shape. Set the text block like a variable and the page updates:

import asyncio

import nu
import nustd


class Home(nustd.ui.Column):
    hello = nustd.ui.TextRef.slot()


op = Home.hello.set("Hello, browser.")

asyncio.run(nu.arun(nustd.ui.serve(op)))

The same goes for workers, a Ray cluster or an LLM: bind another fabric, keep the code. More in examples/, eg python examples/movies.py for a form, a filterable table and detail pages.

Install

Python 3.10 or newer.

pip install "nustd[all]"

nucore is the kernel: the model, the engine and in-memory state. nustd adds the fabrics and pulls in nucore. Pick extras to install only what you need, eg nustd[kv,ui].

Module What it binds Extra
nustd.kv Persistent state over RocksDB, LMDB or SQLite, with transactions and change notifications kv
nustd.blob Write-once bytes, stored and streamed by range. On LMDB, plain files or S3 blob
nustd.ui Widgets as Refs, rendered in the browser and kept live ui
nustd.mp, nustd.cluster Local worker processes or a Ray cluster: run any tree on any worker mp, cluster
nustd.proxy Any fabric, used from another process proxy
nustd.acp Coding agents (Claude Code, Codex, Gemini) over the Agent Client Protocol acp
nustd.llm OpenAI-compatible chat: OpenAI, Ollama, vLLM, OpenRouter, Groq, xAI, Cerebras llm

Plus Python's standard library in the same shape: math, random, time, datetime, itertools, functools, json, pathlib, uuid, decimal and more. Same names and call signatures, but a call returns a tree that composes into the rest of the program. Every module in the nustd README.

The stack

nu is the Python implementation of the interaction model. nuspace is what we build with it: a computational space where everything, the space included, is a nu program.

Community

  • Discord: ask questions, share what you build with nu
  • X @nustackdev: releases and work in progress
  • Issues: bugs and feature requests

Building on nu? Add the badge:

nu

[![nu](https://img.shields.io/badge/built%20with-nu-%237A4CE0)](https://github.com/nustackdev/nu)

License

Apache-2.0. See LICENSE.md.

Metadata

Release files for nucore 0.9.1

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

Source distribution (sdist)

Source distribution for nucore 0.9.1
File Size Uploaded Provenance Actions
nucore-0.9.1.tar.gz 330.8 kB With provenance Details for nucore-0.9.1.tar.gz

Built distribution (wheel)

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

Total release size: 803.5 kB

Release files / nucore-0.9.1.tar.gz

Download URL nucore-0.9.1.tar.gz
Size 330.8 kB
Tags Source
SHA-256 checksum
How to use checksums
afcd757c0145913aee836a09326fc7bb6158b50d7702bb569d370bd12d5fe608
BLAKE2b-256 checksum
How to use checksums
3557c0e111685614032165f8e454b4ebc543f3c8238b825b5941344ab709ae07
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / nucore-0.9.1-py3-none-any.whl

Download URL nucore-0.9.1-py3-none-any.whl
Size 472.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aaa526781aad74a9235fed34577c5251fcaed2224df2030a6cff076180cf6704
BLAKE2b-256 checksum
How to use checksums
8ddec46e82486bd98c03b85f2a209110ba9f92744201eea420f240e3cd71504a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for nucore 0.9.1

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for nucore-0.9.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

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.

Release history Release notifications | RSS feed

This release

0.9.1 This release

2 release files Full provenance

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