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
Built Distribution
Hashes for opensolve-0.0.4-py3-none-any.whl
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 | 11a4703ee645586a6f11691e68fb9c08449f2fc3e41ca9ada752edc048916f4e |
|
| MD5 | b465f611dbb647ba3e22a8aadb853b1b |
|
| BLAKE2b-256 | 131df6ffbe64db3019fae018ad9a6d50612bf2c2c2b68ff00d15c489a44940e5 |