Skip to main content

Opvious Python SDK

Project description

Opvious Python SDK CI Pypi badge

This package provides a lightweight SDK for solving optimization models with the Opvious API. Its main features are:

  • Seamless data import/export via native support for pandas
  • Powerful built-in debugging capabilities: automatic infeasibility relaxation, variable pinning, and more
  • Non-blocking APIs for performant parallel optimization

Quickstart

First, install this package and have an API access token handy (these can be generated here).

pip install opvious[aio]

With these steps out of the way, you are ready to solve any of your optimization models!

import opvious

# Instantiate an API client from an API token
client = opvious.Client(TOKEN)

# Assemble and validate inputs for a registered formulation
inputs = await client.assemble_inputs(
    formulation_name='my-formulation',
    parameters={
        # Formulation parameters...
    }
)

# Start an attempt and wait for it to complete
attempt = await client.start_attempt(inputs)

# Wait for the attempt to complete
outcome = await client.wait_for_outcome(attempt)

Next steps

This SDK is focused on solving optimization models. For convenient access to the rest of Opvious API's functionality, consider using the TypeScript SDK and CLI.

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

opvious-0.4.7.tar.gz (12.6 kB view hashes)

Uploaded Source

Built Distribution

opvious-0.4.7-py3-none-any.whl (14.4 kB view hashes)

Uploaded Python 3

Supported by

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