Skip to main content

edi-maas-sdk

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

Install

pip install edi-maas-sdk

Quick Start

from edi_maas_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-maas-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-maas-sdk 0.1.0
File Size Uploaded
edi_maas_sdk-0.1.0.tar.gz 5.3 kB Details

Built distribution (wheel)

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

Total release size: 11.5 kB

Release files / edi_maas_sdk-0.1.0.tar.gz

Download URL edi_maas_sdk-0.1.0.tar.gz
Size 5.3 kB
Tags Source
SHA-256 checksum
How to use checksums
67f7fdba1fd78ef7b499bb5672c7f6f2e7109c06226778b9261e74b071ef4da0
BLAKE2b-256 checksum
How to use checksums
2b0185bae8fd70b28056c0c87c911162f303a6656179c8c3b1fed93e940a5f8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.6.13

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

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

Release history Release notifications | RSS feed

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

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