Skip to content

Configuration

Set Up Your Environment Variables

To authenticate with Synodes, you need an API key. You can obtain an API key from the Synodes platform.

  1. Navigate to the Synodes Dashboard.
  2. Go to API Keys.
  3. Click the Create Key button.
  4. Add your API key to your .env file by setting the SYNODES_API_KEY environment variable.
  5. Define the Synodes API URL in your .env file by setting the SYNODES_API_URL environment variable.

Configuration Options

Synodes SDK provides an option to configure settings using the SynodesConfig class in Python and TypeScript. The SynodesConfig class accepts the following parameters:

  • api_key: Your Synodes API key
  • api_url: URL of your Synodes API
  • target: Synodes Target to create the Sandboxes on.
from synodes import SynodesConfig
config = SynodesConfig(
api_key="your-api-key",
api_url="your-api-url",
target="us"
)

Environment Variables

Synodes SDK supports environment variables for configuration. The SDK automatically looks for these environment variables:

VariableDescriptionOptional
SYNODES_API_KEYYour Synodes API key.
SYNODES_API_URLURL of your Synodes API.Yes
SYNODES_TARGETSynodes Target to create the Sandboxes on.Yes

Setting Environment Variables

Synodes SDK can read configuration from environment variables. You can set these environment variables using the following methods:

Using a .env File

Create a .env file in your project root directory:

Terminal window
SYNODES_API_KEY=your-api-key
SYNODES_API_URL=https://your-api-url
SYNODES_TARGET=us
  • SYNODES_API_KEY: Your Synodes API key.
  • SYNODES_API_URL: URL of your Synodes API.
  • SYNODES_TARGET: Synodes Target to create the Sandboxes on.

Using Shell Environment

Set environment variables in your shell:

Terminal window
export SYNODES_API_KEY=your-api-key
export SYNODES_API_URL=https://your-api-url

Configuration Precedence

The SDK uses the following precedence order for configuration (highest to lowest):

  1. Explicitly passed configuration in code.
  2. Environment variables.
  3. Configuration file.
  4. Default values.