batchwatch

batchwatch › Client libraries

Nine languages. No dependencies.

One first-party client for every language an LLM pipeline gets written in — and not one of them puts a dependency in your lock file. Standard library only, all nine. HTTP is hand-rolled where it had to be (std::net in Rust, java.net.http, a raw socket in C++) rather than pulling an HTTP client and a JSON parser into your build.

Python

Python 3.8+

The first client, and the one our own prober runs on.

pip install "git+https://github.com/batchwatch/client#subdirectory=python"

PyPIships on tagRead the source →

TypeScript

Node 20+, Deno

Two files. Node 24 runs the TypeScript as it is, with no build step.

curl -O https://raw.githubusercontent.com/batchwatch/client/main/typescript/src/index.ts -O https://raw.githubusercontent.com/batchwatch/client/main/typescript/src/spool.ts

npmships on tagRead the source →

npm cannot install from a subdirectory, so the two sources are the install until the package is on npm.

Go

Go 1.21+

Installs the way every Go package does - the module proxy already serves it.

go get github.com/batchwatch/client/go@latest

go.devliveRead the source →

.NET / C#

net8.0

HttpClient and System.Text.Json, nothing else. Built and tested in CI on every push.

git clone https://github.com/batchwatch/client
dotnet add reference client/dotnet/src/Batchwatch/Batchwatch.csproj

NuGetships on tagRead the source →

Java

Java 17+

java.net.http and nothing from Maven. Kotlin and Scala use it unchanged.

git clone https://github.com/batchwatch/client
mvn -f client/java/pom.xml install

Mavenships on tagRead the source →

PHP

PHP 8.2+

PSR-4 and stream contexts. No Guzzle, no Symfony HTTP client.

git clone https://github.com/batchwatch/client
# then require client/php/bootstrap.php from your autoloader

Packagistships on tagRead the source →

Ruby

Ruby 3.0+

net/http and json from the standard library. No gem dependencies at all.

git clone https://github.com/batchwatch/client
# Gemfile: gem "batchwatch", path: "client/ruby"

RubyGemsships on tagRead the source →

Rust

Rust 1.63+

std::net only - no tokio, no reqwest, no serde in your dependency tree.

git clone https://github.com/batchwatch/client
# Cargo.toml: batchwatch = { path = "client/rust" }

crates.ioships on tagRead the source →

C++

C++17, POSIX

A header and a source file, built with a plain Makefile.

git clone https://github.com/batchwatch/client
make -C client/cpp

source distributionRead the source →

Two lines to adopt, in every one of them

One call before you submit, one context around the job. That is the whole integration, and it is the same shape in all nine languages.

if bw.should_batch("gpt-5.6-sol", max_wait="15m"):
    with bw.track("openai", "gpt-5.6-sol", mode="batch"):
        submit_the_job()

The same three promises, in all nine

Open source, and short enough to read before you install it

Every client is MIT-licensed, and the send path is a few hundred lines with no dependencies to chase. That is the point of publishing them: you can check what leaves your machine yourself instead of taking our word for it.

All nine on GitHub → How the ingest API works