### Install doppler-sdk locally Source: https://github.com/dopplerhq/python-sdk/blob/main/examples/README.md Installs the doppler-sdk package locally using a provided shell script. This method is useful when the package is not yet published to PyPI or for development purposes. It sets up and activates a virtual environment. ```shell . ./install.sh ``` -------------------------------- ### Run doppler-sdk example Source: https://github.com/dopplerhq/python-sdk/blob/main/examples/README.md Executes the sample Python script that utilizes the doppler-sdk. This command assumes the SDK is installed and the environment is set up correctly. It's the primary way to test the SDK's functionality within the example project. ```shell python sample.py ``` -------------------------------- ### Install doppler-sdk via pip Source: https://github.com/dopplerhq/python-sdk/blob/main/examples/README.md Installs the doppler-sdk package from PyPI with a specific version. Ensure you have pip installed and a Python environment set up. This is the standard method for incorporating the SDK into your project. ```shell pip install doppler-sdk==1.3.0 ``` -------------------------------- ### Manage Python Virtual Environment Source: https://github.com/dopplerhq/python-sdk/blob/main/examples/README.md Commands to manage a Python virtual environment created for the doppler-sdk installation. Includes deactivating the current environment and reactivating it for use. ```shell deactivate ``` ```shell source .venv/bin/activate ``` -------------------------------- ### GET /v3/configs - List Configurations Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Lists configurations for a given project, with optional filtering by environment and pagination. ```APIDOC ## GET /v3/configs ### Description Lists configurations for a given project, with optional filtering by environment and pagination. ### Method GET ### Endpoint /v3/configs ### Parameters #### Query Parameters - **project** (str) - Required - The project's name - **environment** (str) - Optional - (optional) the environment from which to list configs - **page** (int) - Optional - Page number - **per_page** (int) - Optional - Items per page ### Response #### Success Response (200) - **response** ([ConfigsListResponse](/src/dopplersdk/models/README.md#configslistresponse)) - Description of the response object. #### Response Example ```json { "response": "ConfigsListResponse object" } ``` ``` -------------------------------- ### GET /v3/configs/config - Get Configuration Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific configuration. Requires project and config name to identify the configuration to fetch. ```APIDOC ## GET /v3/configs/config ### Description Retrieves a specific configuration. Requires project and config name to identify the configuration to fetch. ### Method GET ### Endpoint /v3/configs/config ### Parameters #### Query Parameters - **project** (str) - Required - Unique identifier for the project object. - **config** (str) - Required - Name of the config object. ### Response #### Success Response (200) - **response** ([ConfigsGetResponse](/src/dopplersdk/models/README.md#configsgetresponse)) - Description of the response object. #### Response Example ```json { "response": "ConfigsGetResponse object" } ``` ``` -------------------------------- ### GET /v3/projects Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Lists all projects available in Doppler. Supports pagination. ```APIDOC ## GET /v3/projects ### Description Lists all projects available in Doppler. Supports pagination. ### Method GET ### Endpoint /v3/projects ### Parameters #### Query Parameters - **page** (int) - Optional - Page number for pagination. - **per_page** (int) - Optional - Number of items to display per page. ### Response #### Success Response (200) - **projects** (array) - An array of project objects. - **name** (string) - The name of the project. - **description** (string) - The description of the project. #### Response Example ```json { "projects": [ { "name": "PROJECT_NAME_1", "description": "PROJECT_DESCRIPTION_1" }, { "name": "PROJECT_NAME_2", "description": "PROJECT_DESCRIPTION_2" } ] } ``` ### Example Usage Code Snippet ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize SDK sdk = DopplerSDK() # Set access token sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # Make the API call with pagination parameters results = sdk.projects.list( page = 1, per_page = 20 ) # Print the results pprint(vars(results)) ``` ``` -------------------------------- ### GET /v3/integrations Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Lists all available integrations. ```APIDOC ## GET /v3/integrations ### Description Lists all available integrations. ### Method GET ### Endpoint /v3/integrations ### Parameters This method has no parameters. ### Response #### Success Response (200) - **dict** - A dictionary object containing a list of integrations. #### Response Example ```json { "items": [ { "id": "integration_id_1", "name": "Integration Name 1", "type": "Type 1" }, { "id": "integration_id_2", "name": "Integration Name 2", "type": "Type 2" } ] } ``` ``` -------------------------------- ### GET /v3/environments Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Lists all environments within a specified project. ```APIDOC ## GET /v3/environments ### Description Lists all environments within a specified project. ### Method GET ### Endpoint /v3/environments ### Parameters #### Path Parameters - **project** (str) - Required - The project's name ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **(type)** - [EnvironmentsListResponse] #### Response Example ```json { "example": "" } ``` ``` -------------------------------- ### Get Integration Options Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Fetches available options for a specified integration. ```APIDOC ## GET /v3/integrations/integration/options ### Description Retrieves the available options for a given integration. ### Method GET ### Endpoint /v3/integrations/integration/options ### Parameters #### Query Parameters - **integration** (str) - Required - The slug of the integration for which to fetch options. ### Response #### Success Response (200) - **options** (object) - An object containing the available options for the integration. ### Request Example ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.get.options(integration = 'integration') pprint(vars(results)) ``` ``` -------------------------------- ### GET /v3/environments Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Lists all environments within a project. ```APIDOC ## GET /v3/environments ### Description Lists all environments within a project. ### Method GET ### Endpoint /v3/environments ### Parameters #### Query Parameters - **project** (str) - Required - The project's name ### Response #### Success Response (200) - **response** (EnvironmentsList200Response) - The response object containing a list of environments. #### Response Example ```json { "response": [ { "name": "environment_1", "slug": "env1" }, { "name": "environment_2", "slug": "env2" } ] } ``` ``` -------------------------------- ### GET /v3/configs Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Lists configurations for a project, optionally filtered by environment. ```APIDOC ## GET /v3/configs ### Description Lists configurations for a project, optionally filtered by environment. ### Method GET ### Endpoint /v3/configs ### Parameters #### Query Parameters - **project** (str) - Required - The project's name - **environment** (str) - Optional - (optional) the environment from which to list configs - **page** (int) - Optional - Page number - **per_page** (int) - Optional - Items per page ### Response #### Success Response (200) - **response** ([ConfigsList200Response](../models/README.MD#configslist200response)) - Description of the response object. #### Response Example ```json { "response": "response body" } ``` ``` -------------------------------- ### GET /v3/projects/permissions Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a list of all available project permissions. ```APIDOC ## GET /v3/projects/permissions ### Description Retrieves a list of all available project permissions. ### Method GET ### Endpoint /v3/projects/permissions ### Parameters This method has no parameters. ### Response #### Success Response (200) - **ProjectRolesListPermissionsResponse** ([ProjectRolesListPermissionsResponse]) - The response object containing a list of available permissions. #### Response Example ```json { "permissions": [ "string" ] } ``` ``` -------------------------------- ### GET /v3/configs Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Lists all configurations for a given project, with optional filtering by environment and pagination. ```APIDOC ## GET /v3/configs ### Description Lists all configurations for a given project, with optional filtering by environment and pagination. ### Method GET ### Endpoint /v3/configs ### Parameters #### Query Parameters - **project** (str) - Required - The project's name. - **environment** (str) - Optional - The environment from which to list configs. - **page** (int) - Optional - Page number. - **per_page** (int) - Optional - Items per page. ### Request Example (No request body for GET request) ### Response #### Success Response (200) - **configsListResponse** (ConfigsListResponse) - The response object containing a list of configurations. #### Response Example (Response structure depends on the ConfigsListResponse model) ``` -------------------------------- ### GET /v3/environments/environment Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific environment within a project. ```APIDOC ## GET /v3/environments/environment ### Description Retrieves a specific environment within a project. ### Method GET ### Endpoint /v3/environments/environment ### Parameters #### Path Parameters - **project** (str) - Required - The project's name - **environment** (str) - Required - The environment's slug ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **(type)** - [EnvironmentsGetResponse] #### Response Example ```json { "example": "" } ``` ``` -------------------------------- ### GET /v3/projects Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Retrieves a list of projects. Supports pagination with 'page' and 'per_page' query parameters. ```APIDOC ## GET /v3/projects ### Description Retrieves a list of projects. Supports pagination with 'page' and 'per_page' query parameters. ### Method GET ### Endpoint /v3/projects ### Parameters #### Query Parameters - **page** (int) - Optional - Page number - **per_page** (int) - Optional - Items per page ### Response #### Success Response (200) - **response** ([ListResponse](/src/dopplersdk/models/README.md#listresponse)) - Description of the response object. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /v3/workplace/invites Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Lists all pending workplace invites. Supports pagination. ```APIDOC ## GET /v3/workplace/invites ### Description Lists all pending workplace invites. Supports pagination. ### Method GET ### Endpoint /v3/workplace/invites ### Parameters #### Query Parameters - **page** (int) - Optional - Page number for pagination - **per_page** (int) - Optional - Number of items per page ### Response #### Success Response (200) - **[InvitesListResponse]** - A list of invite objects ### Request Example ```python from dopplersdk import DopplerSDK access_token = '' sdk = DopplerSDK() sdk.set_access_token(access_token) results = sdk.invites.list( page = 1, per_page = 20 ) ``` ``` -------------------------------- ### Get Project Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific project by its unique identifier. Requires an access token and the project ID. Returns a GetResponse object. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.get(project = 'PROJECT_NAME') pprint(vars(results)) ``` -------------------------------- ### GET /v3/configs/config/tokens Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Lists all service tokens for a given project and configuration. This helps in managing access permissions. ```APIDOC ## GET /v3/configs/config/tokens ### Description Retrieves a list of all service tokens associated with a specific project and configuration. ### Method GET ### Endpoint /v3/configs/config/tokens ### Parameters #### Query Parameters - **project** (str) - Required - Unique identifier for the project object. - **config** (str) - Required - Name of the config object. ### Response #### Success Response (200) - Returns a dict object containing a list of service tokens. #### Response Example ```json { "tokens": [ { "name": "TOKEN_NAME_1", "access": "read", "project": "PROJECT_NAME", "config": "CONFIG_NAME", "expire_at": "1917-09-21T23:46:58.0Z" }, { "name": "TOKEN_NAME_2", "access": "write", "project": "PROJECT_NAME", "config": "CONFIG_NAME", "expire_at": "1917-09-21T23:46:58.0Z" } ] } ``` ``` -------------------------------- ### Get Environment Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves details for a specific environment within a project. Requires both the project name and the environment's slug. Returns an EnvironmentsGetResponse object. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.environments.get( project = 'project', environment = 'environment' ) pprint(vars(results)) ``` -------------------------------- ### GET /v3/logs Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Lists activity logs. Supports pagination with optional 'page' and 'per_page' query parameters. ```APIDOC ## GET /v3/logs ### Description Lists activity logs. Supports pagination with optional 'page' and 'per_page' query parameters. ### Method GET ### Endpoint /v3/logs ### Parameters #### Query Parameters - **page** (str) - Optional - Page number - **per_page** (int) - Optional - Items per page ### Request Example ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize the SDK with your access token sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # List activity logs with pagination results = sdk.activity_logs.list( page = '1', per_page = 20 ) # Print the retrieved activity logs pprint(vars(results)) ``` ### Response #### Success Response (200) - **activity_logs** (ActivityLogsListResponse) - A list of activity log entries. ``` -------------------------------- ### Create Doppler Project (Python) Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Demonstrates how to create a new project in Doppler using the Python SDK. This requires an access token and provides an example of the request body and how to print the results. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'description': 'PROJECT_DESCRIPTION', 'name': 'PROJECT_NAME' } results = sdk.projects.create(request_input = request_body) pprint(vars(results)) ``` -------------------------------- ### List Configs in a Project with Doppler Python SDK Source: https://context7.com/dopplerhq/python-sdk/llms.txt This example shows how to list all configurations within a specific project and environment using the Doppler Python SDK. It requires the SDK and an access token. The function accepts project, environment, and pagination parameters, returning a list of configuration objects. ```python from dopplersdk import DopplerSDK sdk = DopplerSDK() sdk.set_access_token("dp.st.your-access-token") try: # List all configs in project results = sdk.configs.list( project='my-web-app', environment='dev', page=1, per_page=20 ) for config in results.configs: print(f"Config: {config.name}, Environment: {config.environment}") except Exception as e: print(f"Error listing configs: {e}") ``` -------------------------------- ### Retrieve a Single Secret with Doppler Python SDK Source: https://context7.com/dopplerhq/python-sdk/llms.txt This example demonstrates how to get the value and metadata of a specific secret using the Doppler Python SDK. It requires the SDK and an access token. The function takes project, config, and secret name as input. ```python from dopplersdk import DopplerSDK sdk = DopplerSDK() sdk.set_access_token("dp.st.your-access-token") try: result = sdk.secrets.get( project='my-web-app', config='dev', name='DATABASE_URL' ) print(f"Secret: {result.name}") print(f"Value: {result.value.raw}") print(f"Computed: {result.value.computed}") except ValueError as e: print(f"Missing required parameter: {e}") except Exception as e: print(f"Error retrieving secret: {e}") ``` -------------------------------- ### Sample Usage: List Projects with DopplerSDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Provides a basic example of using the DopplerSDK to authenticate and list projects. It initializes the SDK, sets the access token, calls the projects list method, and pretty-prints the results. ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize SDK and set access token sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # List projects and print results results = sdk.projects.list() pprint(vars(results)) ``` -------------------------------- ### Install DopplerSDK Python Package Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Installs the DopplerSDK Python package using pip. Ensure you have pip installed and accessible in your environment. This command fetches and installs the latest stable version of the SDK. ```bash pip install doppler-sdk ``` -------------------------------- ### Clone Configuration using Python Doppler SDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Demonstrates how to clone a configuration using the Doppler Python SDK. It requires an access token and specifies the source configuration, new configuration name, and project name. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize the SDK and set the access token sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # Define the request body for cloning a configuration request_body = { 'config': 'CONFIG_NAME', 'name': 'NEW_CONFIG_NAME', 'project': 'PROJECT_NAME' } # Call the clone method and print the results results = sdk.configs.clone(request_input = request_body) pprint(vars(results)) ``` -------------------------------- ### Get Integration by Slug using Doppler SDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Retrieves details for a specific integration identified by its slug. This GET request requires authentication and the integration slug as a parameter. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_BEARER_TOKEN = '' sdk = DopplerSDK() sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) results = sdk.integrations.get(integration = 'ea adipisicing consectetur') pprint(vars(results)) ``` -------------------------------- ### POST /v3/configs - Create Configuration Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Creates a new configuration. Requires project, environment, and name in the request body. ```APIDOC ## POST /v3/configs ### Description Creates a new configuration. Requires project, environment, and name in the request body. ### Method POST ### Endpoint /v3/configs ### Parameters #### Request Body - **request_input** ([ConfigsCreateRequest](/src/dopplersdk/models/README.md#configscreaterequest)) - Optional - Request body. ### Request Example ```json { "environment": "ENVIRONMENT_ID", "name": "CONFIG_NAME", "project": "PROJECT_NAME" } ``` ### Response #### Success Response (200) - **response** ([ConfigsCreateResponse](/src/dopplersdk/models/README.md#configscreateresponse)) - Description of the response object. #### Response Example ```json { "response": "ConfigsCreateResponse object" } ``` ``` -------------------------------- ### POST /v3/projects Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Creates a new project in Doppler. Requires a name and optionally accepts a description. ```APIDOC ## POST /v3/projects ### Description Creates a new project in Doppler. Requires a name and optionally accepts a description. ### Method POST ### Endpoint /v3/projects ### Parameters #### Request Body - **request_input** ([CreateRequest](/src/dopplersdk/models/README.md#createrequest)) - Optional - Request body. - **name** (string) - Required - The name of the project. - **description** (string) - Optional - A description for the project. ### Request Example ```json { "description": "PROJECT_DESCRIPTION", "name": "PROJECT_NAME" } ``` ### Response #### Success Response (201) - **name** (string) - The name of the created project. - **description** (string) - The description of the created project. #### Response Example ```json { "name": "PROJECT_NAME", "description": "PROJECT_DESCRIPTION" } ``` ### Example Usage Code Snippet ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize SDK sdk = DopplerSDK() # Set access token sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # Prepare request body request_body = { 'description': 'PROJECT_DESCRIPTION', 'name': 'PROJECT_NAME' } # Make the API call results = sdk.projects.create(request_input = request_body) # Print the results pprint(vars(results)) ``` ``` -------------------------------- ### Get Sync - Python SDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Retrieves details of a specific sync using project, config, and sync slugs. Requires a bearer token for authentication. This operation targets the GET /v3/configs/config/syncs/sync endpoint. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_BEARER_TOKEN = '' sdk = DopplerSDK() sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) results = sdk.syncs.get( project = 'nostrud aute', config = 'officia est sed veniam tempor', sync = 'sit minim sunt id fugiat' ) pprint(vars(results)) ``` -------------------------------- ### POST /v3/configs/config/syncs Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Creates a new sync for a given project and config. ```APIDOC ## POST /v3/configs/config/syncs ### Description Creates a new sync for a given project and config. ### Method POST ### Endpoint /v3/configs/config/syncs ### Parameters #### Path Parameters - **project** (str) - Required - The project slug - **config** (str) - Required - The config slug #### Request Body - **request_input** ([SyncsCreateRequest](../models/README.MD#syncscreaterequest)) - Optional - Request body. ### Request Example ```json { "data": {}, "import_option": "none", "integration": "nulla nisi dolore commodo" } ``` ### Response #### Success Response (200) (Response details not provided in the input, refer to SyncsCreate200Response) #### Response Example (Example not provided in the input) ``` -------------------------------- ### GET /v3/projects/roles Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a list of all available project roles. ```APIDOC ## GET /v3/projects/roles ### Description Retrieves a list of all available project roles. ### Method GET ### Endpoint /v3/projects/roles ### Parameters This method has no parameters. ### Response #### Success Response (200) - **ProjectRolesListResponse** ([ProjectRolesListResponse]) - The response object containing a list of project roles. #### Response Example ```json { "roles": [ { "name": "string", "permissions": [ "string" ] } ] } ``` ``` -------------------------------- ### GET /v3/me Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves information about the currently authenticated user. ```APIDOC ## GET /v3/me ### Description Retrieves information about the currently authenticated user. ### Method GET ### Endpoint /v3/me ### Parameters This method has no parameters. ### Request Example ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.auth.me() pprint(vars(results)) ``` ### Response #### Success Response (200) - **MeResponse** (object) - The response object containing the authenticated user's details. #### Response Example (Response structure depends on the MeResponse model) ``` -------------------------------- ### List Doppler Projects (Python) Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Shows how to list all projects within Doppler using the Python SDK. It includes optional parameters for pagination (page number and items per page) and demonstrates printing the retrieved project list. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.projects.list( page = 1, per_page = 20 ) pprint(vars(results)) ``` -------------------------------- ### Create Sync Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Creates a new sync for a given project and config. Requires project and config slugs, and accepts an optional request body. ```APIDOC ## POST /v3/configs/config/syncs ### Description Creates a new sync for a given project and config. ### Method POST ### Endpoint /v3/configs/config/syncs ### Parameters #### Path Parameters - **project** (str) - Required - The project slug - **config** (str) - Required - The config slug #### Query Parameters None #### Request Body - **request_input** ([SyncsCreateRequest](/src/dopplersdk/models/README.md#syncscreaterequest)) - Optional - Request body. ### Request Example ```json { "await_initial_sync": true, "data": {}, "import_option": "none", "integration": "integration" } ``` ### Response #### Success Response (200) - **SyncsCreateResponse** ([SyncsCreateResponse](/src/dopplersdk/models/README.md#syncscreateresponse)) - Description of the response object #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /v3/projects/project Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific project by its unique identifier. ```APIDOC ## GET /v3/projects/project ### Description Retrieves a specific project by its unique identifier. ### Method GET ### Endpoint /v3/projects/project ### Parameters #### Path Parameters - **project** (str) - Required - Unique identifier for the project object. ### Request Example ```json { "example": "" } ``` ### Response #### Success Response (200) - **(type)** - Description #### Response Example ```json { "example": "" } ``` ``` -------------------------------- ### POST /v3/projects Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Creates a new project. Allows specifying a name and description for the project. ```APIDOC ## POST /v3/projects ### Description Creates a new project. Allows specifying a name and description for the project. ### Method POST ### Endpoint /v3/projects ### Parameters #### Request Body - **request_input** ([CreateRequest](/src/dopplersdk/models/README.md#createrequest)) - Optional - Request body. ### Request Example ```json { "description": "PROJECT_DESCRIPTION", "name": "PROJECT_NAME" } ``` ### Response #### Success Response (200) - **response** ([CreateResponse](/src/dopplersdk/models/README.md#createresponse)) - Description of the response object. #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### POST /v3/environments Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Creates a new environment within a specified project. ```APIDOC ## POST /v3/environments ### Description Creates a new environment within a specified project. ### Method POST ### Endpoint /v3/environments ### Parameters #### Path Parameters - **project** (str) - Required - The project's name #### Request Body - **request_input** ([EnvironmentsCreateRequest]) - Optional - Request body. - **name** (str) - Required - The name of the environment. - **slug** (str) - Required - The slug of the environment. ### Request Example ```json { "example": "{\"request_input\": {\"name\": \"name\", \"slug\": \"slug\"}}" } ``` ### Response #### Success Response (200) - **(type)** - [EnvironmentsCreateResponse] #### Response Example ```json { "example": "" } ``` ``` -------------------------------- ### GET /v3/integrations/integration Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves details for a specific integration using its slug. ```APIDOC ## GET /v3/integrations/integration ### Description Retrieves details for a specific integration using its slug. ### Method GET ### Endpoint /v3/integrations/integration ### Parameters #### Query Parameters - **integration** (str) - Required - The integration slug ### Request Example ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) results = sdk.integrations.get(integration = 'integration') pprint(vars(results)) ``` ### Response #### Success Response (200) - **IntegrationsGetResponse** (object) - The response object containing integration details. #### Response Example (Response structure depends on the IntegrationsGetResponse model) ``` -------------------------------- ### POST /v3/environments Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Creates a new environment within a project. ```APIDOC ## POST /v3/environments ### Description Creates a new environment within a project. ### Method POST ### Endpoint /v3/environments ### Parameters #### Path Parameters - **project** (str) - Required - The project's name #### Request Body - **request_input** (EnvironmentsCreateRequest) - Optional - Request body for creating the environment. - **name** (str) - Required - The name of the new environment. - **slug** (str) - Required - The slug for the new environment. ### Request Example ```json { "name": "new_env_name", "slug": "new_env_slug" } ``` ### Response #### Success Response (200) - **response** (EnvironmentsCreate200Response) - The response object containing details of the created environment. #### Response Example ```json { "response": "..." } ``` ``` -------------------------------- ### GET /v3/projects/project/members Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Lists all members associated with a specific project, with optional pagination. ```APIDOC ## GET /v3/projects/project/members ### Description Lists all members associated with a specific project, with optional pagination. ### Method GET ### Endpoint /v3/projects/project/members ### Parameters #### Path Parameters - **project** (str) - Required - Project slug #### Query Parameters - **page** (int) - Optional - The page number for pagination. - **per_page** (int) - Optional - The number of results to return per page. ### Response #### Success Response (200) - **ProjectMembersListResponse** ([ProjectMembersListResponse]) - The response object containing a list of project members. #### Response Example ```json { "members": [ { "user": { "id": "string", "slug": "string", "name": "string", "email": "string", "type": "string" }, "role": { "name": "string", "permissions": [ "string" ] }, "environments": [ { "id": "string", "name": "string" } ] } ], "page_info": { "total_count": 100, "current_page": 1, "per_page": 20, "total_pages": 5 } } ``` ``` -------------------------------- ### POST /v3/configs Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Creates a new configuration for a project and environment. ```APIDOC ## POST /v3/configs ### Description Creates a new configuration for a project and environment. ### Method POST ### Endpoint /v3/configs ### Parameters #### Request Body - **request_input** ([ConfigsCreateRequest](../models/README.MD#configscreaterequest)) - Optional - Request body. ### Request Example ```json { "environment": "ENVIRONMENT_ID", "name": "CONFIG_NAME", "project": "PROJECT_NAME" } ``` ### Response #### Success Response (200) - **response** ([ConfigsCreate200Response](../models/README.MD#configscreate200response)) - Description of the response object. #### Response Example ```json { "response": "response body" } ``` ``` -------------------------------- ### Create Project Role - Python Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Creates a new project role. Accepts an optional request body containing the new role's name and permissions. Returns a ProjectRolesCreateResponse. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) request_body = { 'name': 'name', 'permissions': ["velit reprehenderit ipsum","incididunt elit sint qui"] } results = sdk.project_roles.create(request_input = request_body) pprint(vars(results)) ``` -------------------------------- ### GET /v3/configs/config/secret - Retrieve Secret Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific secret from a given project and config. ```APIDOC ## GET /v3/configs/config/secret ### Description Retrieves a specific secret from a given project and config. ### Method GET ### Endpoint /v3/configs/config/secret ### Parameters #### Path Parameters - **project** (str) - Required - Unique identifier for the project object. - **config** (str) - Required - Name of the config object. - **name** (str) - Required - Name of the secret. ### Request Example ```json { "project": "PROJECT_NAME", "config": "CONFIG_NAME", "name": "SECRET_NAME" } ``` ### Response #### Success Response (200) - **SecretsGetResponse** - The response object containing the secret details. #### Response Example ```json { "data": { "name": "SECRET_NAME", "value": "SECRET_VALUE", "description": "Optional description", "computed": false, "environment": null, "dynamic": false } } ``` ``` -------------------------------- ### GET /v3/configs/config/logs/log Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves a specific log entry for a configuration. This is useful for auditing and debugging. ```APIDOC ## GET /v3/configs/config/logs/log ### Description Retrieves a specific log entry for a configuration. This is useful for auditing and debugging. ### Method GET ### Endpoint /v3/configs/config/logs/log ### Parameters #### Path Parameters - **project** (str) - Required - Unique identifier for the project object. - **config** (str) - Required - Name of the config object. - **log** (str) - Required - Unique identifier for the log object. ### Response #### Success Response (200) - **response** ([ConfigLogsGetResponse]) - Description of the response object. #### Response Example ```json { "response": "ConfigLogsGetResponse object" } ``` ``` -------------------------------- ### Retrieve Config Log using Python Doppler SDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Demonstrates how to retrieve a specific log entry for a configuration within a project using the Doppler Python SDK. Requires an access token, project name, configuration name, and the log ID. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize the SDK and set the access token sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # Call the get method for config logs and print the results results = sdk.config_logs.get( project = 'PROJECT_NAME', config = 'CONFIG_NAME', log = 'LOG_ID' ) pprint(vars(results)) ``` -------------------------------- ### GET /v3/configs/config Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Retrieves a specific configuration for a project. ```APIDOC ## GET /v3/configs/config ### Description Retrieves a specific configuration for a project. ### Method GET ### Endpoint /v3/configs/config ### Parameters #### Query Parameters - **project** (str) - Required - Unique identifier for the project object. - **config** (str) - Required - Name of the config object. ### Response #### Success Response (200) - **response** ([ConfigsGet200Response](../models/README.MD#configsget200response)) - Description of the response object. #### Response Example ```json { "response": "response body" } ``` ``` -------------------------------- ### Clone a Config with Doppler Python SDK Source: https://context7.com/dopplerhq/python-sdk/llms.txt This example demonstrates how to duplicate an existing configuration, including all its secrets, using the Doppler Python SDK. It requires the SDK and an access token. The function takes a dictionary with project, original config name, and the new config name. ```python from dopplersdk import DopplerSDK sdk = DopplerSDK() sdk.set_access_token("dp.st.your-access-token") clone_data = { 'project': 'my-web-app', 'config': 'dev', 'name': 'dev_backup' } try: result = sdk.configs.clone(request_body=clone_data) print(f"Cloned config: {result.config.name}") except Exception as e: print(f"Error cloning config: {e}") ``` -------------------------------- ### Python: Create Project using Doppler SDK Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD This Python code snippet demonstrates how to create a new project using the Doppler SDK. It requires a bearer token for authentication and accepts a dictionary for project details like description and name. The function returns the response from the API, which is then pretty-printed. ```Python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_BEARER_TOKEN = '' sdk = DopplerSDK() sdk.set_bearer_token(DOPPLERSDK_BEARER_TOKEN) input = { 'description': 'PROJECT_DESCRIPTION', 'name': 'PROJECT_NAME' } results = sdk.projects.create(request_body=input) pprint(vars(results)) ``` -------------------------------- ### Get Sync Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves details of a specific sync for a given project, config, and sync slug. ```APIDOC ## GET /v3/configs/config/syncs/sync ### Description Retrieves details of a specific sync. ### Method GET ### Endpoint /v3/configs/config/syncs/sync ### Parameters #### Path Parameters - **project** (str) - Required - The project slug - **config** (str) - Required - The config slug - **sync** (str) - Required - The sync slug #### Query Parameters None #### Request Body None ### Request Example None ### Response #### Success Response (200) - **SyncsGetResponse** ([SyncsGetResponse](/src/dopplersdk/models/README.md#syncsgetresponse)) - Description of the response object #### Response Example ```json { "example": "response body" } ``` ``` -------------------------------- ### GET /v3/workplace Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Retrieves current workplace details. This endpoint fetches information about the authenticated workplace. ```APIDOC ## GET /v3/workplace ### Description Retrieves current workplace details. This endpoint fetches information about the authenticated workplace. ### Method GET ### Endpoint /v3/workplace ### Parameters This method has no parameters. ### Request Example ```json {} // No request body needed ``` ### Response #### Success Response (200) - **workplace** (WorkplaceGetResponse) - Details of the workplace. #### Response Example ```json { "workplace": { "id": "workplace_id", "name": "example_workplace", "billing_email": "billing@example.com", "security_email": "security@example.com" } } ``` ``` -------------------------------- ### GET /v3/configs/config/secrets/download - Download Secrets Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Downloads all secrets for a specific config, optionally filtered and transformed. ```APIDOC ## GET /v3/configs/config/secrets/download ### Description Downloads all secrets for a specific config, optionally filtered and transformed. ### Method GET ### Endpoint /v3/configs/config/secrets/download ### Parameters #### Query Parameters - **project** (str) - Required - Unique identifier for the project object. Not required if using a Service Token. - **config** (str) - Required - Name of the config object. Not required if using a Service Token. - **format** ([Format](/src/dopplersdk/models/README.md#format)) - Optional - Specifies the output format for the secrets. - **name_transformer** ([NameTransformer](/src/dopplersdk/models/README.md#nametransformer)) - Optional - Transforms secret names to a different case (e.g., camelCase, snake_case). - **include_dynamic_secrets** (bool) - Optional - Whether or not to issue leases and include dynamic secret values for the config. - **dynamic_secrets_ttl_sec** (int) - Optional - The number of seconds until dynamic leases expire. Must be used with `include_dynamic_secrets`. Defaults to 1800 (30 minutes). - **secrets** (str) - Optional - Comma-delimited list of secrets to include in the download. Defaults to all secrets if left unspecified. ### Request Example ```json { "project": "project", "config": "config", "format": "json", "name_transformer": "camel", "include_dynamic_secrets": true, "dynamic_secrets_ttl_sec": 1800, "secrets": "secret1,secret2" } ``` ### Response #### Success Response (200) - **DownloadResponse** - The response object containing the downloaded secrets. #### Response Example ```json { "secrets": { "SECRET_NAME_1": "SECRET_VALUE_1", "SECRET_NAME_2": "SECRET_VALUE_2" } } ``` ``` -------------------------------- ### GET /v3/integrations/integration Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.MD Retrieves details for a specific integration by its slug. ```APIDOC ## GET /v3/integrations/integration ### Description Retrieves details for a specific integration by its slug. ### Method GET ### Endpoint /v3/integrations/integration ### Parameters #### Path Parameters - **integration** (str) - Required - The integration slug ### Response #### Success Response (200) - **[IntegrationsGet200Response](../models/README.MD#integrationsget200response)** #### Response Example ```json { "id": "integration_id", "name": "Specific Integration", "type": "Specific Type", "data": {} } ``` ``` -------------------------------- ### GET /v3/workplace Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/README.md Retrieves workplace information. This endpoint does not accept any parameters. ```APIDOC ## GET /v3/workplace ### Description Retrieves workplace information. ### Method GET ### Endpoint /v3/workplace ### Parameters This method has no parameters. ### Request Example ```python from pprint import pprint from dopplersdk import DopplerSDK DOPPLERSDK_ACCESS_TOKEN = '' # Initialize the SDK with your access token sdk = DopplerSDK() sdk.set_access_token(DOPPLERSDK_ACCESS_TOKEN) # Retrieve workplace information results = sdk.workplace.get() # Print the retrieved workplace details pprint(vars(results)) ``` ### Response #### Success Response (200) - **workplace** (WorkplaceGetResponse) - The retrieved workplace details. ``` -------------------------------- ### POST /v3/configs/config/clone Source: https://github.com/dopplerhq/python-sdk/blob/main/src/dopplersdk/services/README.md Clones an existing configuration. This allows you to create a duplicate of a configuration, which can then be modified. ```APIDOC ## POST /v3/configs/config/clone ### Description Clones an existing configuration. This allows you to create a duplicate of a configuration, which can then be modified. ### Method POST ### Endpoint /v3/configs/config/clone ### Parameters #### Request Body - **request_input** ([CloneRequest]) - Optional - Request body. ### Request Example ```json { "config": "CONFIG_NAME", "name": "NEW_CONFIG_NAME", "project": "PROJECT_NAME" } ``` ### Response #### Success Response (200) - **response** ([CloneResponse]) - Description of the response object. #### Response Example ```json { "response": "CloneResponse object" } ``` ```