Arco Python bindings
The Python package remains in bindings/python for path compatibility with existing build, release, and editable-install workflows. Its Rust crate is named arco-python and is the Python interaction surface; public Python imports stay under arco.
Python-facing solve orchestration is routed through the shared arco-ops facade where it overlaps with other interaction surfaces. The public Python API remains under arco.
Write a Python-built model to LP format with the shared exporter:
from pathlib import Path
import arco
model = arco.Model()
x = model.add_variable(bounds=arco.NonNegativeFloat, name="x")
model.add_constraint(x >= 1.0, name="minimum")
model.minimize(x, name="cost")
output_path = Path("model.lp")
model.write_lp(output_path)
write_lp accepts a string or any os.PathLike[str], overwrites the target,
and returns None.
Build and install locally with the repository solver setup:
just py-dev
Default Python builds include HiGHS, SCIP, and the runtime-loaded Xpress
backend. Solving with arco.Xpress(...) still requires the FICO Xpress runtime
and a valid license on the target machine.
For direct maturin workflows, run through the solver build environment so the
bindings link against the cached HiGHS and SCIP distributions:
cd ../..
CARGO_INCREMENTAL=0 CARGO_PROFILE_DEV_DEBUG=0 ARCO_HIGHS_ENABLE_APPLE_STATIC=1 ./scripts/with_solver_build_env.sh \
bash -lc 'cd bindings/python && uv sync --group dev && ./.venv/bin/maturin develop'
CARGO_INCREMENTAL=0 and CARGO_PROFILE_DEV_DEBUG=0 are intentional for cold
editable builds: they avoid incremental bookkeeping and debug-info generation
that slow a clean maturin develop build. Leave them unset for normal Rust
edit-compile-test loops where incremental rebuilds and debug info help.
To enable the IPOPT nonlinear backend, build with the ipopt feature (requires
a system IPOPT install):
cd bindings/python
uv run --with maturin maturin develop --features ipopt
To disable optional commercial or native solver features for a source build, turn off default Cargo features and opt back into the backends you need:
cd bindings/python
uv run --with maturin maturin develop --no-default-features --features pyo3/extension-module
Without a solver feature, that solver's Python class remains importable but solve will fail fast with a rebuild hint.
Run linting from the repository root so the project-pinned tool versions are used:
just py-lint-check
just py-type
Run Python example formulations from the repository root:
cd ../..
uv run examples/dense-lp/formulation.py --solve --json
uv run examples/sdom/formulation.py --solve --json
For interactive exploration of dense-lp (no extra script boilerplate):
cd ../..
uv run --with ipython --with-editable ./bindings/python ipython -i examples/dense-lp/formulation.py
Inside IPython, use model to inspect the formulation and call solve() when ready.
Running example problems
The examples/ tree contains standalone Python scripts that build models
directly through the bindings, covering different problem classes:
- LP — linear programs (default HiGHS backend).
- MILP — mixed-integer linear programs (HiGHS).
- NLP — nonlinear programs (requires bindings built with
--features ipopt). - QP / QCP — (quadratically constrained) quadratic programs, solved through the appropriate backend for the problem class.
Run from bindings/python so the locally built extension is on the import path:
cd bindings/python
# LP — Multi-period DC-OPF (HiGHS)
uv run python ../../examples/multi-period-optimal-power-flow/dc-opf-24bus-wind-load-shedding/problem.py
# NLP — Multi-period AC-OPF (IPOPT)
uv run python ../../examples/multi-period-optimal-power-flow/ac-opf-24bus-wind-load-shedding/problem.py
Each script prints the solver status and final objective value alongside the
reference value from the original formulation. Substitute the path to any other
problem.py (or formulation.py) under examples/ to run a different model.
Metadata
Release files for arco 0.13.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| arco-0.13.1.tar.gz | 2.4 MB | With provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| arco-0.13.1-cp311-abi3-win_amd64.whl | CPython 3.11 | abi3 | Windows x86-64 | Details |
| arco-0.13.1-cp311-abi3-manylinux_2_28_x86_64.whl | CPython 3.11 | abi3 | Linux glibc 2.28+ x86-64 | Details |
| arco-0.13.1-cp311-abi3-macosx_11_0_arm64.whl | CPython 3.11 | abi3 | macOS 11.0+ ARM64 | Details |
| arco-0.13.1-cp310-cp310-win_amd64.whl | CPython 3.10 | CPython 3.10 | Windows x86-64 | Details |
| arco-0.13.1-cp310-cp310-manylinux_2_28_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.28+ x86-64 | Details |
| arco-0.13.1-cp310-cp310-macosx_11_0_arm64.whl | CPython 3.10 | CPython 3.10 | macOS 11.0+ ARM64 | Details |
Total release size: 24.8 MB
Release files / arco-0.13.1.tar.gz
| Download URL | arco-0.13.1.tar.gz |
|---|---|
| Size | 2.4 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4e62966ef5635a7d801f0277fd86c4644c7029b96520b757de08c1af9c6ecf2c
|
|
BLAKE2b-256 checksum How to use checksums |
eabc0db0e7dc5c593b5984aab3163dbf2cdd968b0c9ece64d80fef78fb9141fa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp311-abi3-win_amd64.whl
| Download URL | arco-0.13.1-cp311-abi3-win_amd64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.11 Windows x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
9ebabdca22a17f80b68a3a0458eb4ac527ebb6f56709c661199e963f8723260f
|
|
BLAKE2b-256 checksum How to use checksums |
c6f821d3bd3e97b6f2f14f5ff0e4c9629a23d8795c454c80613885278243155f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp311-abi3-manylinux_2_28_x86_64.whl
| Download URL | arco-0.13.1-cp311-abi3-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
a5806ac2020f84fb272b8d3a1b17b3f0055a267d5c89669c9eb29375a2143197
|
|
BLAKE2b-256 checksum How to use checksums |
0fdc17a137f9e8347eb28e1b645473915d705251f96ecd102f45f153a8eb64a2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp311-abi3-macosx_11_0_arm64.whl
| Download URL | arco-0.13.1-cp311-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.11 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
01f73911e4847114876ba818141c03fc098357310324e12b1a94fbeed9637b8f
|
|
BLAKE2b-256 checksum How to use checksums |
c3051a5a431e4f9938e5d2690a3b9d4c2f1ab68c34f885f053ab4aa27f27f041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp310-cp310-win_amd64.whl
| Download URL | arco-0.13.1-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 3.5 MB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
930ab372b73fc0c30d5f425ad1f43998a840b3498155d8d7320f4dc2c407cec0
|
|
BLAKE2b-256 checksum How to use checksums |
069040dd27e95e4d08db2fcd79d7b7ed26825bfe6bac4b71956d3f1a3f93bc8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | arco-0.13.1-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 4.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e9b4d7645076c0d98600c44fe84e6d665dcd195b84be29189aff2a4d3842c3e6
|
|
BLAKE2b-256 checksum How to use checksums |
8ad2dba330d832e5f85e5b6c44396a851516e3b5beba806ed43c2e0696502228
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logRelease files / arco-0.13.1-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | arco-0.13.1-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 3.4 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
11b9653aded119b23a82b01305ec4241e722d920f47ac5dc8e23709c7af0ed9f
|
|
BLAKE2b-256 checksum How to use checksums |
58b2e18535663cacd1fc04d155fa490904c4da65fd3a388bdfe3e266af5d39ef
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.13
|
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 10, 2026.
Transparency logSecurity for arco 0.13.1
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.
Full provenance
All 7 files in this release have been uploaded with provenance metadata.
Attestation for arco-0.13.1.tar.gz
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 10, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.