Skip to main content

The Python client for the OpenSolve linear optimization solver service.

Project description

OpenSolve Python Client

A simple programmatic solution for interacting with the OpenSolve linear optimization service. Read the complete, official docs here.

Use a virtual environment

For every new project, create a new virtual environment. Read about them here.

$ mkdir myProject && cd myProject
$ python3 -m venv myenv

Once you've created the virtual environment, activate it before beginning work.

$ cd path/to/myProject
$ source myenv/bin/activate

Once activated, you'll want to install all necessary packages (like the OpenSolve client) for your project.

Install

Install the python client with

(myenv) $ python3 -m pip install OpenSolve

The OpenSolve client only requires the requests package. The minimum required version of Python is 3.7 (but the latest version of Python is always recommended).

Using It

After setting up your OpenSolve account, you'll be able to do a few cool things.

Submit jobs


from OpenSolve import Client
import time
import os  


# create a client object with your authentication details
c = Client.client('your_username', 'your_password')  


# submit a simple job (default options, no warmstart solution)
response = c.submit_job('path/to/your/problemfile.lp')  

Check on a job

status = c.check_job()

Pull the results of a completed job

results = c.pull_results()

List current and past jobs

jobs = c.ls_jobs()

Get more details at the official docs.

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

opensolve-0.0.4.tar.gz (21.5 kB view details)

Uploaded Source

Built Distribution

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

opensolve-0.0.4-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file opensolve-0.0.4.tar.gz.

File metadata

  • Download URL: opensolve-0.0.4.tar.gz
  • Upload date:
  • Size: 21.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for opensolve-0.0.4.tar.gz
Algorithm Hash digest
SHA256 0d6dd32ae78f2302a27e9c5ce9c67742c043bc203af29a7c2bd5fc17952ffc1b
MD5 1c8c334920ba3559a05482e375a94c14
BLAKE2b-256 fcf991b70700ba48d3d8d467cabd9606d91f8eac7f3b1576f8bc711e3fec125f

See more details on using hashes here.

File details

Details for the file opensolve-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: opensolve-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.3

File hashes

Hashes for opensolve-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 11a4703ee645586a6f11691e68fb9c08449f2fc3e41ca9ada752edc048916f4e
MD5 b465f611dbb647ba3e22a8aadb853b1b
BLAKE2b-256 131df6ffbe64db3019fae018ad9a6d50612bf2c2c2b68ff00d15c489a44940e5

See more details on using hashes here.

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