Skip to main content

NIRYUKTI — sparse optimization for Python

An independently implemented C++20 optimization engine with a Python model API, native sessions, a command-line interface, authenticated HTTP service and offline HTML reporting. No existing optimization solver is used to solve your model.

Install

pip install niryukti
niryukti devices

Python 3.10+ is required. Linux x86_64 wheels bundle the FP64 CPU executable and native library. Source installations require CMake 3.24+ and a C++20 compiler. CUDA is optional and is not bundled in CPU wheels. Version 0.2.1 includes the service and report additions described below.

Build and solve a model

from niryukti import Model, NativeSession

model = Model()
model.add_var("x", ub=10)
model.add_constraint({"x": 1}, ">=", 2)
model.set_objective({"x": 3})
result = model.solve(device="auto", method="auto", time_limit=60)
print(result["status"], result["objective"])

# Keep model data in a native session for repeated requests.
with NativeSession(model) as session:
    print(session.solve())

LP, supported convex sparse QP, MILP and convex MIQP are available. Sparse convexity certification and advanced integer algorithms have documented limits; this is a research optimizer, not a validated replacement for every industrial solver. Nonconvex global optimization is unsupported. Always inspect status and verification diagnostics rather than assuming a returned point is optimal.

CLI, verification and reports

niryukti inspect model.mps
niryukti solve model.mps --method auto --device auto --time-limit 60 --json-out result.json
niryukti verify model.mps result.json
niryukti report result.json --output report.html

Automatic selection considers structure and GPU memory; explicit methods remain available. Reports are portable, printable HTML derived from saved telemetry. Rendering a report does not independently certify its input.

HTTP API

export NIRYUKTI_API_TOKEN="your-long-random-secret"
niryukti serve --host 127.0.0.1 --port 8090 --workers 2 --max-time 300

Send Authorization: Bearer <token> to /v1/health, /v1/solve or /v1/report. Solve requests contain a native JSON model and optional solver settings. The service bounds request size, concurrency and solve time, and does not accept client executable paths. It is synchronous; disconnecting does not cancel computation. Put remote deployments behind HTTPS and appropriate access controls. Full examples are in the repository's docs/api.md.

CUDA and source builds

Build the repository with -DNIRYUKTI_CUDA=ON, then set NIRYUKTI_BINARY to its executable and NIRYUKTI_LIBRARY to libniryukti_c.so when using native sessions. Legacy VANTAGE environment variables remain compatibility aliases. Build distributions with python -m build; CPU wheels do not download GPU code.

License

AGPL-3.0-only for original project code, with third-party notices retained. Copying and commercial use are permitted under the license terms. Covered modified distributions retain AGPL; modified network deployments must offer corresponding source to users. See the bundled LICENSE and NOTICE.

Metadata

Release files for niryukti 0.2.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 niryukti 0.2.1
File Size Uploaded
niryukti-0.2.1.tar.gz 3.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for niryukti 0.2.1
File Interpreter ABI Platform
niryukti-0.2.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.27+ x86-64, Linux glibc 2.28+ x86-64 Details

Total release size: 4.8 MB

Release files / niryukti-0.2.1.tar.gz

Download URL niryukti-0.2.1.tar.gz
Size 3.2 MB
Tags Source
SHA-256 checksum
How to use checksums
5b0ecc7207784327578d1c9102c90755d69bcca66f5dc69b77cf4cab9699128a
BLAKE2b-256 checksum
How to use checksums
5823b425e7dfd8c6ff7d4eac19ac399a0f64ed83197e6be8ac251381c64130b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 28, 2026.

Transparency log

Release files / niryukti-0.2.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl

Download URL niryukti-0.2.1-py3-none-manylinux_2_27_x86_64.manylinux_2_28_x86_64.whl
Size 1.6 MB
Tags Linux glibc 2.27+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
5a408b35551e8d1bcc11eb72ab00b3af83456ab86e1b0702d56b1574e9791a54
BLAKE2b-256 checksum
How to use checksums
75ba452b7d7b65f38c583e4083af8c1650c6655001b7052e643b6e84628f93b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 28, 2026.

Transparency log

Release history Release notifications | RSS feed

0.2.2

2 release files

This release

0.2.1 This release

2 release files

0.2.0

2 release files

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