Pyoptinterface

PyOptInterface

Using PyOptInterface with Nextmv

PyOptInterface is an open-source Python library to provide a unified API to construct and solve optimization models with various optimizers.

Get started

A community app is a great place to get started with the PyOptInterface integration. Make sure to specify the python runtime in your app’s app.yaml manifest:

# This manifest holds the information the app needs to run on the Nextmv Cloud.
type: python
runtime: ghcr.io/nextmv-io/runtime/python:3.11
# List all files/directories that should be included in the app. Globbing
# (e.g.: configs/*.json) is supported.
files:
  - main.py
python:
  # Packages the app depends on need to be listed in a requirements.txt file
  # that is referenced here. All listed packages will get bundled with the app.
  pip-requirements: requirements-arm64.txt
Copy

Read more about using Python with Nextmv.

Languages & runtimes

Supported languages and available runtimes for PyOptInterface apps are listed in the table below. These properties must be defined in the app manifest for your app to run remotely.

Language Runtime
Pythonghcr.io/nextmv-io/runtime/python

Community apps

The community apps listed in the table below use PyOptInterface.

Community app Description
python-pyoptinterface-knapsackSolve a knapsack problem with PyOptInterface.

Clone a community app locally using Nextmv CLI:

nextmv community clone -a python-pyoptinterface-knapsack
Copy

Page last updated

Go to on-page nav menu