Basic Usage

Instantiating a Client for Optimization Work

Without Environment Variables

Instantiate a qci_client.QciClient for QCi’s production server with your secret API token string as follows—

  • # An alias for `from qci_client.optimization.client import OptimizationClient as QciClient`.
  • from qci_client import QciClient
  • client = QciClient(url="https://api.qci-prod.com", api_token="<secret_token>")

With Environment Variables

To access the API using environment variables, set the following—

  • QCI_API_URL - URL string for the Qatalyst API. Example: “https://api.qci-prod.com
  • QCI_TOKEN - Secret API token string for securely accessing the Qatalyst API.

then instantiate a qci_client.QciClient as follows—

  • # An alias for `from qci_client.optimization.client import OptimizationClient as QciClient`.
  • from qci_client import QciClient
  • client = QciClient()