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 uv:
cd bindings/python
uv sync --group dev
uv run --with maturin maturin develop
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
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 Distribution
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.6.1.tar.gz.
File metadata
- Download URL: arco-0.6.1.tar.gz
- Upload date:
- Size: 379.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9d550d47b75f31feda4262050389518c543f3327e5cb3e992ad04c1db8525683
|
|
| MD5 |
dba60ea9606d919d594ad7ef0e343417
|
|
| BLAKE2b-256 |
1c3a37ee7f21da18f7324fdd96343b063a44df228dff2cdc5d92aac3085bc5c9
|
Provenance
The following attestation bundles were made for arco-0.6.1.tar.gz:
Publisher:
pypi-manual-release.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.6.1.tar.gz -
Subject digest:
9d550d47b75f31feda4262050389518c543f3327e5cb3e992ad04c1db8525683 - Sigstore transparency entry: 1565595616
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@26eeb674ab57743ec27d305f154e10020dd0dec8 -
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:
pypi-manual-release.yaml@26eeb674ab57743ec27d305f154e10020dd0dec8 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file arco-0.6.1-cp312-cp312-manylinux_2_38_x86_64.whl.
File metadata
- Download URL: arco-0.6.1-cp312-cp312-manylinux_2_38_x86_64.whl
- Upload date:
- Size: 7.8 MB
- Tags: CPython 3.12, 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 |
3c74bbe5f679c5f6ebf3da8e39936411efe0842ea2b1d0d1631d4a382cd88b03
|
|
| MD5 |
49174015b87ef648860da8f44eeaa457
|
|
| BLAKE2b-256 |
60337b7f33bf53ced0d725139f2c6fd86d05bb49a8fb316bc39186f5dde80edb
|
Provenance
The following attestation bundles were made for arco-0.6.1-cp312-cp312-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.6.1-cp312-cp312-manylinux_2_38_x86_64.whl -
Subject digest:
3c74bbe5f679c5f6ebf3da8e39936411efe0842ea2b1d0d1631d4a382cd88b03 - Sigstore transparency entry: 1552244803
- Sigstore integration time:
-
Permalink:
NatLabRockies/arco@05ca9221ad97b4c95d6b236af4fb2df0884ceacf -
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@05ca9221ad97b4c95d6b236af4fb2df0884ceacf -
Trigger Event:
push
-
Statement type: