SDK

📘

Credentials are required to use the SDK

The SDKs authenticate with an API key or OAuth client credentials. See API Authentication to create either, and each SDK's documentation for how to pass them.

Monte Carlo provides convenient programmatic access to all APIs and additional features via a simple yet powerful SDK.

REST API v2 SDKs

🚧

Beta

The REST API v2 SDKs are versioned 0.x, and a new minor version may carry breaking changes.

The Python and Go SDKs cover the REST API v2: deployments, collection agents and data stores, credentials, warehouses and connections. Both read credentials from their options, from MCD_DEFAULT_* environment variables, or from a profile in ~/.mcd/profiles.ini written by the CLI.

Python

pycarlo2 is a separate package from pycarlo, which covers the GraphQL API; the two can be installed side by side. It requires Python 3.10 or later:

pip install pycarlo2

With credentials already configured through the CLI, a client needs no options:

import pycarlo2

client = pycarlo2.new_client()
print(pycarlo2.UsersApi(client).get_current_user())

See the Python SDK reference for every operation, other ways to pass credentials, and paginated lists.

Go

go get github.com/monte-carlo-data/mc-sdk-go/montecarlo

See its documentation for usage and examples.


Did this page help you?