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.1.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.1-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: opticlient-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 10d6904168f2ce5acfc4ba11dd192f87d670bfe645a5a1aa08c272eff98f9103
MD5 a4c1537449718f4be208e5ac5d43079a
BLAKE2b-256 11ccbdb52826eedd83b3108aeeff7eb88d2e02ca143669efb233be2593741227

See more details on using hashes here.

File details

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

File metadata

  • Download URL: opticlient-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 aea61beb43092e8631e1042cba17715c9bf7f5dc2367794c936262a8837385de
MD5 652ffcf28b95a1fc8d026ba4083bbf16
BLAKE2b-256 1ac5796186ed298e092b85e215a3a4632ec8249af4b457f106a87dd62aa98357

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