Python SDK
Datasets
Register Hugging Face datasets and upload local datasets from Python.
Register a Hugging Face dataset
import reflex
dataset = reflex.register_huggingface_dataset("hf://datasets/owner/repo")
reflex.validate_dataset(dataset["id"])Upload a local dataset
import reflex
ds = reflex.upload_dataset(
path="./training-data.tar",
name="kitchen-pickup-v3",
)upload_dataset does the three steps (create_dataset → upload to the
returned URL → complete_dataset) in one call. Use the lower-level helpers
if you want to control them individually.
Function reference
| Function | Description |
|---|---|
register_huggingface_dataset(hf_source_uri) | Register a public HF dataset. |
validate_dataset(dataset_id) | Validate a registered dataset. |
create_dataset(*, name, size_bytes=None, request_id="") | Create a dataset row and get a presigned upload URL. |
complete_dataset(dataset_id, *, size_bytes=None) | Mark an uploaded dataset ready. |
upload_dataset(path, *, name=None, request_id="") | One-shot upload helper. |
list_datasets(*, status=None) | List datasets, optionally filtered. |
get_dataset(dataset_id) | Fetch metadata for one dataset. |
All helpers accept api_key= and (where applicable) url= / convex_url=
overrides.