Python bindings for Arco optimization library
Project description
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 is unchanged.
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:
uv run ruff check .
uv run ty check .
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file arco-0.9.0.tar.gz.
File metadata
- Download URL: arco-0.9.0.tar.gz
- Upload date:
- Size: 2.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
04c8bbae3701715050e02573baf3d7e2d7d7ae12cc2f556d81063eab8b5c88ef
|
|
| MD5 |
8d5eb52f0e96947340558bdfd24eaebd
|
|
| BLAKE2b-256 |
0eb79746caba3e97c6310d0f585c3666f53a6f5de5cd64c338d7b7b37f058bb7
|
Provenance
The following attestation bundles were made for arco-0.9.0.tar.gz:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0.tar.gz -
Subject digest:
04c8bbae3701715050e02573baf3d7e2d7d7ae12cc2f556d81063eab8b5c88ef - Sigstore transparency entry: 2195149038
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp311-abi3-win_amd64.whl.
File metadata
- Download URL: arco-0.9.0-cp311-abi3-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.11+, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9aebe1bf338e2931e26794a42fa25cf7e1e6d340dc51ad5a6a22954f75839fe1
|
|
| MD5 |
7f5264a4429bbd4d2181d197b934692c
|
|
| BLAKE2b-256 |
3eba65f2157a093ed70f9aa1c04e6c71f12e66b4ee617954a1230da16270b758
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp311-abi3-win_amd64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp311-abi3-win_amd64.whl -
Subject digest:
9aebe1bf338e2931e26794a42fa25cf7e1e6d340dc51ad5a6a22954f75839fe1 - Sigstore transparency entry: 2195149054
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp311-abi3-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: arco-0.9.0-cp311-abi3-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.11+, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
957aa8e85ff707616c1856f619038c5ca115cdee7d3010d5c40ada474cb3125e
|
|
| MD5 |
ff6a874c899537e8836c51cec37c2391
|
|
| BLAKE2b-256 |
2ece4517186c910d96017af846f7d3b50af70d35fc188a9ebc4babaa07648f12
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp311-abi3-manylinux_2_38_x86_64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp311-abi3-manylinux_2_38_x86_64.whl -
Subject digest:
957aa8e85ff707616c1856f619038c5ca115cdee7d3010d5c40ada474cb3125e - Sigstore transparency entry: 2195149042
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp311-abi3-macosx_11_0_arm64.whl.
File metadata
- Download URL: arco-0.9.0-cp311-abi3-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.11+, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4d852a995c137e58e6c0bb496b9f80aee0e65ee9281f995cc0e4d6a2629859f4
|
|
| MD5 |
8a272c4a2b079e74090de05cb2ef21f2
|
|
| BLAKE2b-256 |
fb6013dffcb20c804fa4785dba3847b8b4159964b6790997d2f2a38abd235ab2
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp311-abi3-macosx_11_0_arm64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp311-abi3-macosx_11_0_arm64.whl -
Subject digest:
4d852a995c137e58e6c0bb496b9f80aee0e65ee9281f995cc0e4d6a2629859f4 - Sigstore transparency entry: 2195149050
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp310-cp310-win_amd64.whl.
File metadata
- Download URL: arco-0.9.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c836a0af9b029bb45df6fc87f7d2044a2c5c67e1c589aa8123090a2aa66e6ed
|
|
| MD5 |
8ef041eef58bb4ea750586793acf105b
|
|
| BLAKE2b-256 |
da2f52d8d18b82d225a85048612112888ad416446a0bf9d044648a5c2dc993e6
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp310-cp310-win_amd64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp310-cp310-win_amd64.whl -
Subject digest:
8c836a0af9b029bb45df6fc87f7d2044a2c5c67e1c589aa8123090a2aa66e6ed - Sigstore transparency entry: 2195149053
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp310-cp310-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: arco-0.9.0-cp310-cp310-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 4.1 MB
- Tags: CPython 3.10, manylinux: glibc 2.38+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c5f4b5e17c5b9d824c9663bd936ffcbaa675afbd9ee229278484477bb56ce680
|
|
| MD5 |
40b0bf5b5125dead7725db8062f98d32
|
|
| BLAKE2b-256 |
fa81c8b0f20dc7fa5ca6f21a3510d72770f30dbe82c3d730d5f224d03838e54a
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp310-cp310-manylinux_2_38_x86_64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp310-cp310-manylinux_2_38_x86_64.whl -
Subject digest:
c5f4b5e17c5b9d824c9663bd936ffcbaa675afbd9ee229278484477bb56ce680 - Sigstore transparency entry: 2195149057
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type:
File details
Details for the file arco-0.9.0-cp310-cp310-macosx_11_0_arm64.whl.
File metadata
- Download URL: arco-0.9.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 3.3 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
47042919ca86b65c6a6e46a3879ecea5a8e07a51cfa2729a6eaf37dcd42dddab
|
|
| MD5 |
38637fe54cc2d1ce8017f0bd1e371e4c
|
|
| BLAKE2b-256 |
fdaaa397e3aef2c9ed86c0fc3efbd39c31ff1e9e07889155d9c44f2be1b2f1fc
|
Provenance
The following attestation bundles were made for arco-0.9.0-cp310-cp310-macosx_11_0_arm64.whl:
Publisher:
release-please.yaml on NatLabRockies/arco
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
arco-0.9.0-cp310-cp310-macosx_11_0_arm64.whl -
Subject digest:
47042919ca86b65c6a6e46a3879ecea5a8e07a51cfa2729a6eaf37dcd42dddab - Sigstore transparency entry: 2195149041
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@d430a42d7083916986140d32a87ecd94498fa8ed -
Branch / Tag:
refs/heads/main - Owner: https://github.com/NatLabRockies
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-please.yaml@d430a42d7083916986140d32a87ecd94498fa8ed -
Trigger Event:
push
-
Statement type: