Skip to main content
You can interact with the API through HTTP requests from any language or via our official Python bindings (alpha)

Authentication

Make sure to follow the previous steps described in Authentication to obtain an API key and account ID.

Installing the SGP SDK Client

To install the ScaleGP Python client, run the following command:
Python
pip install scale-gp-beta

Configuring the Client

The SGP client supports two ways to configure the API endpoint: For standard Scale GP deployments, use the environment parameter:
Python
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key="your-api-key",
    account_id="your-account-id",
    environment="development"
)
Available environments:
  • "production" - Legacy production at https://api.egp.scale.com (default)
  • "production-multitenant" - Multitenant production at https://api.sgp.scale.com
  • "development" - Development environment at https://api.dev-sgp.scale.com
  • "staging" - Staging environment at https://api.staging-sgp.scale.com
  • "local" - Local development at http://127.0.0.1:5003/public

Using the base_url Parameter

For custom endpoints or proxies, use the base_url parameter:
Python
client = SGPClient(
    api_key="your-api-key",
    account_id="your-account-id",
    base_url="https://my-custom-proxy.example.com"
)
You can also set the base URL via the SGP_CLIENT_BASE_URL environment variable.
Do not specify both environment and base_url simultaneously. Use environment for standard deployments and base_url for custom endpoints.

Example Usage

Examples on how to use the SGP client can be found in Recipes. For the rest of this guide, we’ll use the development environment:
Python
from scale_gp_beta import SGPClient

client = SGPClient(
    api_key="your-api-key",
    account_id="your-account-id",
    environment="development"
)
⚠️ The Scale GP Beta Python client is under active development, and many of the features in this document rely on the latest versions. To make sure you have the latest version, run pip install scale-gp-beta --upgrade.