Skip to main content

Python client for SaaS optimization API

Project description

opticlient

A lightweight Python client for interacting with the SaaS optimization API.
This package provides a clean interface for submitting optimization jobs, polling their status, and retrieving results.

Currently supported tools:

  • Single Machine Scheduling (sms) — submit an Excel instance and obtain an ordered job schedule.

More tools will be added in future versions.

For details visit: https://github.com/Milan-Adhikari/opticlient


Installation

pip install opticlient

Quick Usage Guide

opticlient requires an API key, which you obtain from the website https://cad-eta.vercel.app

You can provide it in either of two ways:

Option 1 - Environment variable (recommended)

export OPTICLIENT_API_TOKEN="YOUR_API_KEY"

Option 2 - Pass directly in code

from opticlient import OptiClient

client = OptiClient(api_token="YOUR_API_KEY")

Quick Start: Single Machine Scheduling (SMS)

The SMS tool takes an Excel file describing a scheduling instance and returns an ordered sequence of jobs. You can download the sample Excel file from https://cad-eta.vercel.app or see below.

Basic usage

from opticlient import OptiClient

client = OptiClient()  # reads token/base URL from environment if available

schedule = client.sms.run(
    file_path="instance.xlsx",
    description="Test run",
)

print("Job schedule:")
for job in schedule:
    print(job)

Sample Excel File format

Job Job1 Job2 Job3 Job4
Job1 0 2 1 1
Job2 3 0 1 1
Job3 5 4 1 2
Job4 2 2 1 0

Versioning

This package follows semantic versioning:

  • 0.x — early releases, API may change
  • 1.0+ — stable API

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

opticlient-0.1.2.tar.gz (11.8 kB view details)

Uploaded Source

Built Distribution

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

opticlient-0.1.2-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file opticlient-0.1.2.tar.gz.

File metadata

  • Download URL: opticlient-0.1.2.tar.gz
  • Upload date:
  • Size: 11.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for opticlient-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6e24e677dfee71aeaf712e06298e10dfb765cca234a649d385830916944d9459
MD5 ea4cc1b801efb0427888990706e8ced2
BLAKE2b-256 f3345fd1b72c19f222459c3a4bd4c7aca4068a4f1427aee14928c5ba5fa7243a

See more details on using hashes here.

File details

Details for the file opticlient-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: opticlient-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.7

File hashes

Hashes for opticlient-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b1c0beda7ab258c25d649dbe59a98c74692daea66a4cbe5e6eab4d60129a4a14
MD5 32c52c079f5f0f9d42305ab56a3aae13
BLAKE2b-256 ed910a369a1e910497577df1e9451f66e39f72a80ce73ebc399aab7748548059

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