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.
Optionally, set the following—
- QCI_SSL_VERIFY - Set to “false” to disable server TLS/SSL certificate verification (needed for self-signed certificates; insecure). Defaults to “true”. This can also be controlled via the
ssl_verifyargument toqci_client.QciClient, which takes precedence over the environment variable.
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()