Install & Compatibility
Where this runs
tested against v3.13.0 · 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
py 3.9
✕ build_error
✕ build_error
265MB installed
● package 265MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
RapidataClient
✓ from rapidata import RapidataClient
The primary client class for all API interactions.
rapidata_config
✓ from rapidata import rapidata_config
Used for global configuration of logging, upload settings, and other SDK behaviors.
Initializes the `RapidataClient` for interacting with the API. It demonstrates both interactive login (which opens a browser for authentication) and programmatic authentication using `client_id` and `client_secret` environment variables or direct arguments. Once authenticated, the client provides managers for `order` and `validation` operations. An illustrative (commented out) example of creating a compare order is included to show typical usage, noting that actual data points and valid URLs are required.
import os
from rapidata import RapidataClient
# Option 1: Interactive login (opens browser)
# client = RapidataClient()
# Option 2: Using client ID and secret (recommended for automation)
client_id = os.environ.get('RAPIDATA_CLIENT_ID', 'your_client_id_here')
client_secret = os.environ.get('RAPIDATA_CLIENT_SECRET', 'your_client_secret_here')
if client_id == 'your_client_id_here' or client_secret == 'your_client_secret_here':
print("Please set RAPIDATA_CLIENT_ID and RAPIDATA_CLIENT_SECRET environment variables or replace placeholders.")
# Fallback to interactive login for demonstration if env vars are not set
# client = RapidataClient() # Uncomment for interactive flow if env vars are missing
else:
client = RapidataClient(client_id=client_id, client_secret=client_secret)
# Example: Create a simple compare order (requires actual data and context)
# This is a placeholder as full order creation requires specific data inputs
try:
# This part is illustrative as it requires actual data (datapoints) and URLs
# order_name = "My Example Alignment Order"
# instruction = "Which image matches the description better?"
# contexts = ["A small blue book sitting on a large red book."]
# datapoints = [["https://example.com/image1.jpg", "https://example.com/image2.jpg"]]
# order = client.order.create_compare_order(
# name=order_name,
# instruction=instruction,
# contexts=contexts,
# datapoints=datapoints
# )
# print(f"Order created: {order.name} (ID: {order.id})")
print("RapidataClient initialized. You can now use client.order, client.validation, etc.")
except Exception as e:
print(f"Could not create order example (requires valid credentials and data): {e}")
# To reset credentials saved locally:
# client.reset_credentials()
Debug
Known issues
gotchaThe `RapidataClient` can authenticate interactively by opening a browser window for login if `client_id` and `client_secret` are not provided. This is convenient for initial setup but unsuitable for automated scripts or server environments.fixFor automated workflows, generate a Client ID and Secret in your Rapidata settings and pass them directly to the `RapidataClient` constructor: `RapidataClient(client_id="YOUR_ID", client_secret="YOUR_SECRET")` or use environment variables.
affects: All versions
breakingWhile specific details of breaking changes between major versions (e.g., 2.x to 3.x) are not readily available in public search results, API clients often introduce significant changes to method signatures, object structures, or authentication mechanisms. The documentation mentions versions 2.x and 3.x, implying such changes.fixAlways refer to the official 'Migration Guide' (if available on docs.rapidata.ai) or release notes when upgrading between major versions. Test your code thoroughly after any upgrade.
affects: Likely between major versions (e.g., 2.x to 3.x)
gotchaRapidata API calls, especially for creating orders, often require specific data formats (e.g., public URLs for images/videos, correctly structured contexts and datapoints). Incorrect formatting or inaccessible URLs will lead to API errors, which might not be immediately clear from the client-side error message.fixConsult the Rapidata documentation for the exact payload requirements for each API call (e.g., `create_compare_order`). Validate your input data thoroughly before making API requests. Implement robust error handling (try/except) to catch and inspect API responses for detailed error messages.
affects: All versions
Upgrade
Version history
3.13.0latest on PyPI · released Jun 12, 2026
Audit
Dependencies
No dependency data recorded yet.