Python

UCall for Python

pip install ucall 1.0.0-rc.1 · 60202332

Topics

Installation1Wheels cover CPython 3.12 to 3.15 on Linux, macOS and Windows, plus the free-threaded 3.14t and 3.15t, where the module declares it runs without the interpreter lock, and a source build needs CMake and a C++20 compiler.
QuickstartA server answers on one or more interfaces, and a client calls it; neither starts a thread.
Serving52ucall.Server takes the interfaces to answer on, and backend and cpuclass keywords naming a ucall.Backend and a ucall.CPUClass, by member or by name such as "linux-epollaio".
Requests34A Request is what a handler annotated to take one receives.
Files and Streams14Handlers run on the polling thread, so a reply or a pull that finishes later runs on a worker: request.detach() hands the request over as a ucall.DetachedRequest, which reads and replies like a Request and alone has the three verbs below.
Batches1A batch endpoint gathers matching requests from every event loop into one queue and hands them to its handler in batches, which suits work that is cheaper per request in bulk, like GPU inference.
Calling20A Client submits calls without driving the network, and polls to drive them and collect what finished.
Noise Keys3Interfaces and calls can run over the Noise protocol instead of plain TCP, authenticating both sides by 32-byte Curve25519 static keys.
Errors22A failed operation raises ucall.Error, a RuntimeError whose status is the ucall.Status it reported and whose message is a static detail beside it.
Threads and Polling1The package starts no threads and needs no event loop of its own: every handler runs on a thread the application lent to a polling call.
DesignThe binding is a thin native layer, and every rule below follows from that.