Configuration

Environment-specific API configuration for PACER endpoints.

class pacersdk.config.ConfigLoader(path: str | None = None)

Bases: object

Loads environment-specific API configuration from a JSON file.

This class reads configuration values for different environments (e.g., “qa”, “prod”) from either a bundled default.json or a user-supplied path.

Parameters:

path (str or None) – Optional path to a JSON file with configurations.

get(env: str) dict

Retrieve API URL configuration for the given environment.

Parameters:

env (str) – Environment name (“qa” or “prod”).

Returns:

A dictionary containing auth and API URLs.

Return type:

dict

Raises:

ValueError – If the environment is not found in the configuration.