Plug an HTTP API into Nu.
You need to talk to an HTTP API. Name the endpoints once and call them from your Nu program like anything else.
Point Nu at your API.
List the endpoints you need. Give Nu the base URL. Now inside your Nu program, calling an endpoint hits the real API and hands the response back.
Start with the endpoints you already hit — GET this, POST that. Name them and give each one its path.
Hand Nu the base URL. That is the whole client — no request builder, no wrapper class per API.
Call an endpoint anywhere in the program. The response comes back parsed and ready for whatever comes next.
What you get out of it.
A few things that fall out once your API speaks Nu.
One shape for every verb.
GET, POST, PUT, PATCH, DELETE all read the same in your code. No client class per API, no request builder to learn.
Sync or async, your call.
Write the program however you write it today. Nu runs sync programs and async programs the same way, and picks the right HTTP path underneath.
Plays with everything else.
A response is a normal Nu value the moment you get it. Feed it into a live UI, drop it in storage, or hand it to the next call.
Goes well with.
Once your responses are Nu values, the rest of the stack picks them up.
nu.ui
See responses on screen.
Wire a fetch straight into a live widget. Refresh the value, the page redraws. No render code in between.
nu.kv
Remember responses on disk.
Cache what you fetched. Track cursors between polls. Reload later and pick up where you left off.
nu.proxy
Use one client from many processes.
Keep the client in one process, call it from others. Your code does not notice the difference.
Try Nu.
One command gets you the wheel with every fabric. Then follow the movies tutorial to build a real app in an afternoon.
01 Install
pip install "nustack-py[all]"02 Run the demo
nu demo movies03 Build your app
Browse examplesLike what you see?
The project is young. Star it, join the room, watch what we ship next.