Skip to main content

DataRobot Pulumi Provider for Python

The DataRobot Resource Provider lets you manage DataRobot resources with Pulumi Infrastructure as Code.

Installation

Install the package using pip:

pip install pulumi_datarobot

Configuration

Configure the provider using environment variables or Pulumi config:

# Environment variables
export DATAROBOT_API_TOKEN=your_api_token
export DATAROBOT_ENDPOINT=https://your.datarobot.instance/api/v2

# OR using Pulumi config
pulumi config set datarobot:apikey --secret your_api_token
pulumi config set datarobot:endpoint https://your.datarobot.instance/api/v2

Quick Start

import pulumi
import pulumi_datarobot as dr

# Create a DataRobot use case
use_case = dr.UseCase("my-use-case",
    name="ML Project Use Case",
    description="Created with Pulumi")

# Create a project from a dataset
project = dr.Project("my-project",
    name="Customer Churn Prediction",
    dataset_url="https://s3.amazonaws.com/datarobot-datasets/churn.csv",
    use_case_id=use_case.id)

# Create a deployment
deployment = dr.Deployment("my-deployment",
    project_id=project.id,
    model_id=project.recommended_model_id,
    environment_id="your-prediction-environment-id")

# Export important values
pulumi.export("use_case_id", use_case.id)
pulumi.export("project_id", project.id)
pulumi.export("deployment_id", deployment.id)

Examples

Complete examples are available in the examples directory.

Air-Gapped Environments

For air-gapped deployments:

1. Store state locally

pulumi login --local

2. Install Python dependencies offline

Create wheel directory and download packages:

mkdir wheels
pip wheel pulumi-datarobot -w wheels/
tar cf wheels.tar wheels/

Transfer wheels.tar to your air-gapped system, then install:

tar xf wheels.tar
pip install wheels/* -f wheels/ --no-index

3. Download DataRobot plugin manually

Download the plugin binary from the releases page:

# Replace v0.14.1 with your version, e.g., v0.10.14
pulumi plugin install resource datarobot v0.14.1 --server \
  https://github.com/datarobot-community/pulumi-datarobot/releases/v0.14.1/

4. Skip update checks

export PULUMI_SKIP_UPDATE_CHECK=true

Advanced Usage

Custom Authentication

import pulumi_datarobot as dr

# Using API token credential
api_token = dr.ApiTokenCredential("my-token",
    name="Production API Token",
    api_token="your-secure-token")

# Using basic authentication
basic_auth = dr.BasicCredential("my-basic-auth",
    name="Basic Auth Credential",
    username="your-username",
    password="your-password")

Working with Models

# Register a custom model
custom_model = dr.CustomModel("my-custom-model",
    name="Customer Segmentation Model",
    target_type="Regression",
    target_name="revenue",
    description="Custom model for customer revenue prediction")

# Create a registered model from leaderboard
registered_model = dr.RegisteredModelFromLeaderboard("my-registered-model",
    project_id=project.id,
    model_id="model-id-from-leaderboard",
    name="Best Performing Model")

Resources

Version

Package version: v0.14.1

Metadata

Release files for pulumi-datarobot 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pulumi-datarobot 0.14.1
File Size Uploaded Provenance Actions
pulumi_datarobot-0.14.1.tar.gz 207.1 kB Without provenance Details for pulumi_datarobot-0.14.1.tar.gz

Release files / pulumi_datarobot-0.14.1.tar.gz

Download URL pulumi_datarobot-0.14.1.tar.gz
Size 207.1 kB
Tags Source
SHA-256 checksum
How to use checksums
cff7012e9b76a86e20634b39510fe7fa52ff9ce0863cceab274865e5348b23c4
BLAKE2b-256 checksum
How to use checksums
776dca88ff3fa1093f485b7a8ddee8a7dd2b97c456fe9cf5c2eb5d9ade958693
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

Security for pulumi-datarobot 0.14.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.14.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page