Skip to main content

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 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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

arco-0.10.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

arco-0.10.0-cp311-abi3-win_amd64.whl (3.4 MB view details)

Uploaded CPython 3.11+Windows x86-64

arco-0.10.0-cp311-abi3-manylinux_2_38_x86_64.whl (4.2 MB view details)

Uploaded CPython 3.11+manylinux: glibc 2.38+ x86-64

arco-0.10.0-cp311-abi3-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

arco-0.10.0-cp310-cp310-win_amd64.whl (3.3 MB view details)

Uploaded CPython 3.10Windows x86-64

arco-0.10.0-cp310-cp310-manylinux_2_38_x86_64.whl (4.1 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

arco-0.10.0-cp310-cp310-macosx_11_0_arm64.whl (3.3 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

Details for the file arco-0.10.0.tar.gz.

File metadata

  • Download URL: arco-0.10.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

Hashes for arco-0.10.0.tar.gz
Algorithm Hash digest
SHA256 2734d7846f6fe5c5a441513c0d9a66c60ca1ab62b5f7f126313b19b8b4a53d6c
MD5 a3db85b1be0f77d42ea31ec9009931e6
BLAKE2b-256 798a29f41dd24bb04b85739d4132d5b6f8212d1fb7d384f65b3ed11196a6f46d

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0.tar.gz:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: arco-0.10.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 3.4 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

Hashes for arco-0.10.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 4d6aa7346febdcd5cd13326e9cf8c6b2d57104f8ef683e11a9af0a5278655bba
MD5 c0427313bcb41e89e9c676f9218b5ebf
BLAKE2b-256 874c53a545f70a0252f4295f03e9712881245c65eed272928c76a3fe715d2eaa

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp311-abi3-win_amd64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp311-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for arco-0.10.0-cp311-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 edbf5084bad91c25d83cada031c3809fd05f4b923aff81f2e5034c4bf14a50ed
MD5 a81fb2672ca027e0a2748f0c0ec48abe
BLAKE2b-256 f5a804fbc3f1de6c31c11a93ef6c64c4153b2697e33d76636ceb01fcdb264698

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp311-abi3-manylinux_2_38_x86_64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arco-0.10.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e8f3f70a6d7b83ff8f7a3087125ff4bfea6079a1aeb4df23565584b4d9f2857f
MD5 0768a11953c16b35e93b59077ad6c550
BLAKE2b-256 c60494a6f9e4abc02fb4f408b876a564c7e162938bbc2e58a0c0fa44f49e706e

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp311-abi3-macosx_11_0_arm64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arco-0.10.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

Hashes for arco-0.10.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 34dc346a437334d8b7a4beb34093d90dedf8488eb2ed936a56824d8455fa9330
MD5 11422f6f30662b331f828a1be7745061
BLAKE2b-256 90e7a34f45def292294bdc8a794f6d0db462e2499c832b29310c609e75fb0611

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp310-cp310-win_amd64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for arco-0.10.0-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 ceb606151fa28c428992d5f2ab2dff5285fafe9098e23bffa27b3fb2d52bed89
MD5 c52753d691220774cff67a30286d48ca
BLAKE2b-256 232874423c181566081f7a5f2480147877232972ed80fca33711d9b3f3171fb4

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp310-cp310-manylinux_2_38_x86_64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file arco-0.10.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arco-0.10.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b4b20606229f18293a18e3a1a4b5af08c44043654d6735d39f196f7a5c61e6fd
MD5 d0434090d8cf56d56650e4570f3e4bc0
BLAKE2b-256 1172d345f23fabc1d34cc86b42c27f640c6c3d7f131fe9c76e335c727ef6a519

See more details on using hashes here.

Provenance

The following attestation bundles were made for arco-0.10.0-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: release-please.yaml on NatLabRockies/arco

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page