Environment

This section documents environment and endpoint helpers used by the GPP client to resolve runtime environments and service URLs.

These APIs support client configuration and endpoint selection.

Environment Configuration

The environment configuration defines the supported runtime environments for the GPP client.

class gpp_client.environment.GPPEnvironment(value)[source]

Bases: str, Enum

GPP environments with associated metadata.

DEVELOPMENT = 'DEVELOPMENT'
PRODUCTION = 'PRODUCTION'
property base_url: str

Return the base URL for the environment.

Returns:

Base URL for the environment.

Return type:

str

Endpoint Utilities

The endpoint utilities provide helper functions for resolving GraphQL and WebSocket URLs for a given environment.

class gpp_client.urls.Endpoint(value)[source]

Bases: str, Enum

API endpoints for the GPP client.

GRAPHQL = '/odb'
WEBSOCKET = '/ws'

URL endpoints for the GPP client.

gpp_client.urls.get_graphql_url(environment: GPPEnvironment) str[source]

Return the GraphQL URL for an environment.

Parameters:

environment (GPPEnvironment) – The environment for which to construct the GraphQL URL.

Returns:

The GraphQL URL for the given environment.

Return type:

str

gpp_client.urls.get_ws_url(environment: GPPEnvironment) str[source]

Return the WebSocket URL for an environment.

Parameters:

environment (GPPEnvironment) – The environment for which to construct the WebSocket URL.

Returns:

The WebSocket URL for the given environment.

Return type:

str