A lightweight Python library for scoring predictions with DataRobot models. It provides a simple API to interact with DataRobot's prediction server, supporting both REST and batch predictions. Current version: 1.13.5, maintained by DataRobot. Release cadence is irregular.
pip install datarobot-predictVerified import paths — ran on the pinned version, not inferred.
Creates a ScoreClient and makes a single prediction or batch predictions. Endpoint includes deployment ID. API key should be set in environment.
Construct endpoint URL as 'https://app.datarobot.com/predApi/v1.0/deployments/{deployment_id}/predictions' and pass it as 'endpoint' parameter.Use 'api_key' parameter instead of 'username' and 'password'.
Use 'response.json()' to get a dict or access attributes directly.
For single prediction: client.predict(data={'feature1': 'value'}). For multiple: client.predict_batch([{'feature1': 'value1'}, ...])No dependency data recorded yet.