Skip to main content

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

Default Python builds include the runtime-loaded Xpress backend. Solving with arco.Xpress(...) still requires the FICO Xpress runtime and a valid license on the target machine.

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 Xpress for a source build, turn off default Cargo features:

cd bindings/python
uv run --with maturin maturin develop --no-default-features --features pyo3/extension-module

Without this feature, arco.Xpress(...) is 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


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.7.0.tar.gz (398.4 kB view details)

Uploaded Source

Built Distributions

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

arco-0.7.0-cp311-cp311-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11Windows x86-64

arco-0.7.0-cp311-cp311-manylinux_2_38_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.38+ x86-64

arco-0.7.0-cp311-cp311-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

arco-0.7.0-cp311-abi3-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.11+Windows x86-64

arco-0.7.0-cp311-abi3-manylinux_2_38_x86_64.whl (7.9 MB view details)

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

arco-0.7.0-cp311-abi3-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.11+macOS 11.0+ ARM64

arco-0.7.0-cp310-cp310-win_amd64.whl (9.1 MB view details)

Uploaded CPython 3.10Windows x86-64

arco-0.7.0-cp310-cp310-manylinux_2_38_x86_64.whl (7.9 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.38+ x86-64

arco-0.7.0-cp310-cp310-macosx_11_0_arm64.whl (6.4 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

File details

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

File metadata

  • Download URL: arco-0.7.0.tar.gz
  • Upload date:
  • Size: 398.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.13

File hashes

Hashes for arco-0.7.0.tar.gz
Algorithm Hash digest
SHA256 607f1bdbeefad8577cb5a2a0ddce2990d18d837784fdf80e7e8af72ea3fb406e
MD5 e2d607c7e55589c4295fc854518f461a
BLAKE2b-256 1b3d1da242ce54b7802c382078cecddf426d6c5bdb5c88831035543452ec4502

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: arco-0.7.0-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 9.1 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.7.0-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 f4e4fc4a5d5fdb5601c4572eab328e016f3d234fc363a0ea90a077e8303563af
MD5 160d5b973bba87126d6718281e15a296
BLAKE2b-256 e4132e34c527e133de01bbcc3f22a1a104ce05004821d2c826099e02cb64586c

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-cp311-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for arco-0.7.0-cp311-cp311-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 198ceef1be8ca20a40b2a94e3dbbb539f8cd2f10edfe8ebd561085f63231de3f
MD5 076a6a4706ac217042774bd21bd13fd2
BLAKE2b-256 530d0d96fda5127788d00e58250cb464178bc7cb9e60563424cd962b3f31dad9

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arco-0.7.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dd3c7010fb140beeaf0381498958f85e2566e2f2b54da4afc7dba7f3dcbd5775
MD5 8733f4c988d32b9c3bc512fbbd5682e4
BLAKE2b-256 f31ca9556a95c55332daa0d3fa8ba4f20837abed4f7b0aac6ca36ea041eb25fa

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-abi3-win_amd64.whl.

File metadata

  • Download URL: arco-0.7.0-cp311-abi3-win_amd64.whl
  • Upload date:
  • Size: 9.1 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.7.0-cp311-abi3-win_amd64.whl
Algorithm Hash digest
SHA256 e7362ef0b5d3bc7587be7ac69b042c35cfde9646e7fefef9a42d360b5f1b76f2
MD5 ebd1d302be9d06d96db5d20d1d5b7790
BLAKE2b-256 d9f1fa8ad7aa754270764f5d22b8af23d75be29c9610cdb8726cd64d1779e820

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-abi3-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for arco-0.7.0-cp311-abi3-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 64d29540aa3b545a91adebe30f97aac0b20b023771ba0e36dd82dd5120f3a39c
MD5 1f5c4cd2b8948d69bb7dfe57261a3433
BLAKE2b-256 f491c1672f1def48c38a482de8901020945079ae4f1419f22c560ab3ca2c79be

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp311-abi3-macosx_11_0_arm64.whl.

File metadata

  • Download URL: arco-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 6.4 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

Hashes for arco-0.7.0-cp311-abi3-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 dca6043b73cbf3e5ee20bb227db3e32b4b533bff60dfff7da7281b4da6d78931
MD5 912ab0c6c36b5dc42791073dc06786b9
BLAKE2b-256 7b0b7e22f69d5b45d8077a3db919574069b2d4b50d5c3d477c5dc643587203dd

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: arco-0.7.0-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 9.1 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.7.0-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 54966af0bd8d99d6eb2f64237e6f7df30d61e2b11e9cb76bab1eaf62410d0ffa
MD5 128f54a8b4a9e4eb757ed6a71af15602
BLAKE2b-256 d2ca624e5032b98ca991a8ef340dbac1e4c0386ec1e098e92f6c68f78f298073

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp310-cp310-manylinux_2_38_x86_64.whl.

File metadata

File hashes

Hashes for arco-0.7.0-cp310-cp310-manylinux_2_38_x86_64.whl
Algorithm Hash digest
SHA256 77e8ed4bbe9a27a97d2517a77b1961c25339c5cdc93c3e9585428d6c296f7893
MD5 10af6e219df531ba7675c5304222b1f0
BLAKE2b-256 207cbd4fe803ab3f2e0a64555748a4537e1c6ccd2ac2e0589c857426a59a5ed7

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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.7.0-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for arco-0.7.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 888aaea4055e19f7b8318875d9f06bd4b8f01f63129626626c08f68e043c4cae
MD5 943e4fa235ab2908660c3ae9d3ddbc73
BLAKE2b-256 6eb657cccc2a46cb97b2bb63b55dd21d8e054b2a9aeb0d8f3b5112b3feaa47bd

See more details on using hashes here.

Provenance

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

Publisher: pypi-manual-release.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