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.file_download("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 |
file_download(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, vision, 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.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| edi_maas_sdk-0.1.4.tar.gz | 8.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| edi_maas_sdk-0.1.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / edi_maas_sdk-0.1.4.tar.gz
| Download URL | edi_maas_sdk-0.1.4.tar.gz |
|---|---|
| Size | 8.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
341eeef077b5af5ad0dcd63ccef13b4a24a072b5309075e2ec14d0549d28c456
|
|
BLAKE2b-256 checksum How to use checksums |
553179c0d9d51ed860a5b1dcd073d53da3c71363fe0db4fb15be3c020a245f93
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|
Release files / edi_maas_sdk-0.1.4-py3-none-any.whl
| Download URL | edi_maas_sdk-0.1.4-py3-none-any.whl |
|---|---|
| Size | 8.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1e442ba76f053cc16233619fc961e75b3c6640997818bf1840fec1e196c8e9f1
|
|
BLAKE2b-256 checksum How to use checksums |
6e7382f16bc46f4798661ec3cadae2756f57ee323495d29f29ef20b459bef2ad
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.6.13
|