Skip to main content

edi-hub-sdk

MaaS Platform Python SDK — HTTP client for model and dataset management.

Install

pip install edi-hub-sdk

Quick Start

from edi_hub_sdk import DatasetCategory, DatasetFormat, DatasetSplit, EdiApi

api = EdiApi(endpoint="https://maas.example.com/maas-service", api_key="edik-...")

# List models
repos = api.list_repos("models")
for r in repos:
    print(r.name, r.status)

# Create a model (display_name required; name is auto-generated)
result = api.create_repo("models", display_name="My Model", description="A fine-tuned model")

# Create a dataset (display_name required, name auto-generated; optional enums)
result = api.create_repo(
    "datasets",
    display_name="My Dataset",
    dataset_category=DatasetCategory.TEXT_CORPUS,
    format=DatasetFormat.PARQUET,
    split=DatasetSplit.TRAIN,
    tags=["nlp"],
)

# List versions
refs = api.list_repo_refs("models", org_id="acme", name=result.name)
for ref in refs:
    print(ref.id, ref.version_name)

# Browse files
files = api.list_repo_tree("models", org_id="acme", name=result.name, version=refs[0].version_name, recursive=True)
for f in files:
    print(f.type, f.path, f.size)

# Download (returns presigned URL; optional expires in seconds, max 3600)
info = api.download_file("models", org_id="acme", name=result.name, version=refs[0].version_name, path="pytorch_model.bin", expires=1800)
print(info.url, info.expires_in)

# Upload
api.upload_file("models", org_id="acme", name=result.name, file_path="./weights.bin")

# Upload a whole folder (filename = path relative to folder)
api.upload_folder("models", org_id="acme", name=result.name, local_dir="./artifacts")

Configuration

Environment Variable Description Default
MAAS_ENDPOINT MaaS service base URL http://localhost:8000/maas-service
MAAS_SDK_API_KEY SDK API key (required)

API Reference

EdiApi(endpoint=None, api_key=None)

Create a client. Reads MAAS_ENDPOINT and MAAS_SDK_API_KEY from environment if not provided.

Methods

Method Description
create_repo(repo_type, display_name, model_category?, dataset_category?, format?, split?, tags?) Create a model or dataset (name is auto-generated)
list_repos(repo_type, keyword?, page_no?, page_size?) List repos
list_repo_refs(repo_type, *, org_id, name) List versions
list_repo_tree(repo_type, *, org_id, name, version, path?, recursive?) Browse files
download_file(repo_type, *, org_id, name, version, path, expires?) Get presigned download URL (expires in seconds, max 3600)
upload_file(repo_type, *, org_id, name, file_path, relative_path?) Upload a file (optional explicit relative path)
upload_folder(repo_type, *, org_id, name, local_dir) Upload a whole folder (relative paths preserved)

Enums

create_repo accepts typed enums for category / format / split fields. The server validates these and rejects unknown values with HTTP 422.

Enum Values
ModelCategory llm, embedding, image, audio, rerank, video
DatasetCategory text_corpus, instruction_tuning, image_caption, image_generation, lora_training, object_detection, image_classification, image_segmentation, other
DatasetFormat parquet, jsonl, csv, arrow, image_folder, text_folder, custom
DatasetSplit train, validation, test, train+validation, all, custom

License

MIT

Release files for edi-hub-sdk 0.1.0

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

Source distribution (sdist)

Source distribution for edi-hub-sdk 0.1.0
File Size Uploaded
edi_hub_sdk-0.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for edi-hub-sdk 0.1.0
File Interpreter ABI Platform
edi_hub_sdk-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 11.4 kB

Release files / edi_hub_sdk-0.1.0.tar.gz

Download URL edi_hub_sdk-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8878c27db0ff3e2a14532ee8bac44060fb5606caef3aa5737c4ca68efc3e1775
BLAKE2b-256 checksum
How to use checksums
252ca9900911f669090f823c6902d0151251c51239c70b1878fd524c4525c9bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.13

Release files / edi_hub_sdk-0.1.0-py3-none-any.whl

Download URL edi_hub_sdk-0.1.0-py3-none-any.whl
Size 6.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ce50bedcb8813738c3b96e54b868d6fa79302bb3c36c4ac661e8654a2dbe55d
BLAKE2b-256 checksum
How to use checksums
b2c0e0840321c734194410cb776412a9dac95ca834224cf5245690d09f951806
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.13

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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