Nu – the interaction primitive.
Build apps in one primitive that spans your whole stack (databases, UIs, AI agents, and services). No glue. 50x less code.
Every app is a set of interactions between systems: a database, a UI, AI agents, and services. Nu makes interaction the primitive:
- Ref names what you touch. A KV slot, a UI widget, an LLM endpoint, a memory slot, a remote object.
- Interaction describes what to do with it. Read, write, branch, iterate, compose.
- Fabric binds Refs to a real backend. Swap the Fabric, keep the tree.
Persistence, reactivity, atomicity, observability, and scalability are inherent, not bolted on.
Example
A dashboard on a live counter that persists across restarts. One Nu tree, two Fabrics.
import nu
class Counter(nu.Shape):
value: nu.v.IntRef
class Dashboard(nu.ui.Page):
count: nu.ui.TextRef
class App(nu.ui.Index):
pages = nu.ui.Pages({"/": Dashboard})
app = nu.With(
nu.v.presets.rocksdb_navigator(".dbtest"),
nu.ui.presets.server(
nu.v.auto_flow_atomic(
nu.ReactForever(
Counter.value.on_change(),
Dashboard.count.set(Counter.value),
),
),
),
body=(
nu.IfDo(Counter.value.missing(), Counter.value.set(0))
>> nu.ForeverDo(
Counter.value.inc() >> nu.Delay(1.0),
)
),
)
if __name__ == "__main__":
import asyncio
asyncio.run(nu.arun(nu.v.auto_flow_atomic(app)))
Run it, open the browser tab. The counter ticks once a second, the dashboard mirrors it live. Kill it, run again, it picks up where it left off.
More examples in examples/. Full walkthrough at nustack.dev/docs.
Fabrics
A Fabric implements Refs against one backend. Nu ships five in-tree.
| Fabric | What |
|---|---|
nu.m |
In-process substrate. Zero-config default for tests, notebooks, cache. |
nu.v |
Persistent substrate backed by virtuals. Virtual Python collections over RocksDB, LMDB, more. |
nu.ui |
Refs on screen. Binds Nu Refs to a live browser tab. |
nu.invisibles |
Location-independent Nus. Transparent RPC across processes and machines. |
nu.ray |
Compute across the cluster. Scale Nu on Ray without leaving the model. |
Swap the Fabric, keep the tree. Same program runs against different substrates.
Install
Python 3.12+.
pip install "nustack-py[all]"
See nustack.dev/docs/how-to/install for lean installs and source builds.
Apps built on Nu
- nulog. Structured logging as a Nu app. Handles billions of entries, UI dashboard out of the box.
Status
Alpha. APIs will break.
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nustack_py-0.1.3.tar.gz.
File metadata
- Download URL: nustack_py-0.1.3.tar.gz
- Upload date:
- Size: 1.7 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8513ea2b9135c53d5a93c284706067e5d769fc7451bd6c8165fe8eac74cdc7e7
|
|
| MD5 |
5f5572d7654bcb5fba236b264529e473
|
|
| BLAKE2b-256 |
e9916fde391e5268641c356a27ccf75e8ce477433aac44ed2102e64cfd0f8944
|
Provenance
The following attestation bundles were made for nustack_py-0.1.3.tar.gz:
Publisher:
publish-nu.yml on nustackdev/nu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nustack_py-0.1.3.tar.gz -
Subject digest:
8513ea2b9135c53d5a93c284706067e5d769fc7451bd6c8165fe8eac74cdc7e7 - Sigstore transparency entry: 2360418916
- Sigstore integration time:
-
Permalink:
nustackdev/nu@04191bb9e9d13dfa67db535345fcb95494230593 -
Branch / Tag:
refs/tags/nu@0.1.3 - Owner: https://github.com/nustackdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-nu.yml@04191bb9e9d13dfa67db535345fcb95494230593 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nustack_py-0.1.3-py3-none-any.whl.
File metadata
- Download URL: nustack_py-0.1.3-py3-none-any.whl
- Upload date:
- Size: 430.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/7.0.0 CPython/3.13.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9c116fcac2fbc5bbfe80da99093eb18b4f3c7261aa30a3f448f1cfc1e78ce743
|
|
| MD5 |
2267f3179c7a6ba9f5c57b3286fdaed1
|
|
| BLAKE2b-256 |
84b7b51fc3b6f80d50ce1941bafb2aa232bc7fb16eb3e13b1b2fb0fd96e9975d
|
Provenance
The following attestation bundles were made for nustack_py-0.1.3-py3-none-any.whl:
Publisher:
publish-nu.yml on nustackdev/nu
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nustack_py-0.1.3-py3-none-any.whl -
Subject digest:
9c116fcac2fbc5bbfe80da99093eb18b4f3c7261aa30a3f448f1cfc1e78ce743 - Sigstore transparency entry: 2360418952
- Sigstore integration time:
-
Permalink:
nustackdev/nu@04191bb9e9d13dfa67db535345fcb95494230593 -
Branch / Tag:
refs/tags/nu@0.1.3 - Owner: https://github.com/nustackdev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-nu.yml@04191bb9e9d13dfa67db535345fcb95494230593 -
Trigger Event:
push
-
Statement type: