Registry / ai-ml / datarobot-predict

datarobot-predict

JSON →
library1.13.5pypypi✓ verified 81d ago

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-predict
INSTALL
IMPORT
SIG · DATAROBOT-PREDICT
D
datarobot-predict
ai-mlpythonv1.13.5
Install
9.7s avg
Import
Disk
200MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.13.5 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.910 runs
installs and imports cleanly · install 0.0s · import 0.000s · 197.7MB
glibc
py 3.103.910 runs
installs and imports cleanly · install 9.7s · import 0.000s · 191MB
200MB installed
● package 200MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

TimeSeriesType
from datarobot_predict import TimeSeriesType
from datarobot_predict import ScoreClient

Creates a ScoreClient and makes a single prediction or batch predictions. Endpoint includes deployment ID. API key should be set in environment.

from datarobot_predict import ScoreClient client = ScoreClient( endpoint='https://example.datarobot.com/predApi/v1.0/deployments/<deployment_id>/predictions', api_key=os.environ.get('DATAROBOT_API_KEY', ''), max_prediction_time=30 ) # Single prediction response = client.predict(data={'feature1': 'value1', 'feature2': 123}) print(response) # Batch predictions batch_data = [{'feature1': 'a', 'feature2': 1}, {'feature1': 'b', 'feature2': 2}] batch_response = client.predict_batch(batch_data) print(batch_response)
Debug
Known issues
breakingIn v1.12+, the 'ScoreClient' no longer accepts 'deployment_id' as a separate argument; you must include the full endpoint URL with deployment ID. Old code that passed deployment_id separately will break.
fix
Construct endpoint URL as 'https://app.datarobot.com/predApi/v1.0/deployments/{deployment_id}/predictions' and pass it as 'endpoint' parameter.
affects: >=1.12.0
breakingIn v1.10+, the default authentication method changed to use 'api_key' parameter. The old 'username' and 'password' parameters are deprecated and will raise an error if used.
fix
Use 'api_key' parameter instead of 'username' and 'password'.
affects: >=1.10.0
gotchaThe 'predict' method returns a 'PredictionResponse' object, not a dict. Access fields like 'response.predictions' or convert with 'response.json()'.
fix
Use 'response.json()' to get a dict or access attributes directly.
affects: all
gotchaIf you pass a single row as a list, the library might misinterpret it as multiple rows. Always wrap a single row in a list or use 'predict' for a single dict.
fix
For single prediction: client.predict(data={'feature1': 'value'}). For multiple: client.predict_batch([{'feature1': 'value1'}, ...])
affects: all
Upgrade
Version history
1.13.5latest on PyPI · released Dec 24, 2025
Audit
Dependencies

No dependency data recorded yet.

Agent activity
21 hits · last 30 days
node
18
Amazon
1
Bingbot
1
OpenAI (training)
1
Resources
datarobot-predict — pip install datarobot-predict · libregistry