Core

Package

Python interface for copp-py.

Import the package as:

import copp_py as copp

The public package follows the Rust crate layout. Core modeling types are available through focused namespaces such as copp.path, copp.robot, copp.constraints, copp.objective, copp.interpolation, and copp.clarabel. Solver entry points live under copp.solver with one module per algorithm, for example copp.solver.topp2_ra.solve and copp.solver.copp3_socp.solve.

A few frequently used core types are also re-exported at the package root for interactive use. Solver-specific problem, option, result, and function names are intentionally kept inside their algorithm modules.

copp_py.version()

Return the copp-py package version.

Returns:

The version compiled into the native extension.

Return type:

str

Errors

exception copp_py.CoppError

Bases: Exception

Base exception for errors reported by the Rust COPP core.

Python wrapper argument errors, such as invalid dtype or mutually exclusive keyword arguments, use standard Python exceptions like ValueError. This exception is reserved for errors returned by the underlying COPP library.

exception copp_py.PathError

Bases: CoppError

Exception for errors reported by Rust path construction and evaluation APIs.

This is a subclass of CoppError.

exception copp_py.ConstraintError

Bases: CoppError

Exception for errors reported by Rust constraint storage and query APIs.

This is a subclass of CoppError.

Enums

class copp_py.OutOfRangeMode

Bases: object

Python enum mirroring [RustOutOfRangeMode].

class copp_py.Parametrization

Bases: object

Python enum mirroring [RustParametrization].

class copp_py.MatrixLayout

Bases: object

Matrix layout contract used by Python path inputs and outputs.

class copp_py.Verbosity

Bases: object

Verbosity level used by Rust solver diagnostics.