Metadata-Version: 2.4
Name: meddroid-sdk
Version: 0.2.0
Summary: MedDroid SDK — fine-tune medical models, build RAGs, run local inference, and publish to the MedDroid Marketplace.
Author-email: "Dr. Sanjay Anbu" <support@medicalandroid.com>
Maintainer-email: "Dr. Sanjay Anbu" <support@medicalandroid.com>
License-Expression: Apache-2.0
Project-URL: Homepage, https://medicalandroid.com/#/model-studio
Project-URL: Marketplace, https://medicalandroid.com
Keywords: medical,llm,fine-tuning,rag,healthcare,meddroid
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Requires-Dist: requests>=2.31
Requires-Dist: rich>=13.0
Provides-Extra: train
Requires-Dist: transformers>=4.40; extra == "train"
Requires-Dist: peft>=0.10; extra == "train"
Requires-Dist: trl>=0.8; extra == "train"
Requires-Dist: datasets>=2.18; extra == "train"
Requires-Dist: accelerate>=0.29; extra == "train"
Provides-Extra: serve
Requires-Dist: fastapi>=0.110; extra == "serve"
Requires-Dist: uvicorn>=0.29; extra == "serve"
Provides-Extra: rag
Requires-Dist: sentence-transformers>=2.6; extra == "rag"
Requires-Dist: chromadb>=0.4; extra == "rag"

# MedDroid SDK (Python) — `meddroid-sdk`

Fine-tune medical models, build RAGs, run local inference, and publish to the
**MedDroid Marketplace** — from one CLI.

> **Status:** early scaffold (v0.1.0). The training / RAG / serving helpers wrap
> standard open-source tooling and work today; `submit` posts to the live
> Marketplace intake (the `medicalandroid-chat` Worker → Supabase) and falls back
> to writing `submission.json` only if that's unreachable. Not yet published to
> PyPI — install from source for now.
>
> Your files, data and compute stay on **your own machine/GPU**; we only store the
> submission's link + metadata.

PyPI distribution name is **`meddroid-sdk`**; the import module and CLI are
**`meddroid`**.

## Install

```bash
# once published:  pip install meddroid-sdk

# from source (this folder) for now
pip install -e .

# with training / serving / rag extras
pip install -e ".[train,serve,rag]"
```

## Use

```bash
meddroid login
meddroid train --base phi3-mini --data data.jsonl --out ./my-model
meddroid rag build ./my-files --out ./my-rag
meddroid rag query ./my-rag "What is the sepsis bundle timeline?"
# many questions? load once, answer instantly (REPL, or --port for a local HTTP API):
meddroid rag serve ./my-rag
meddroid serve ./my-model --port 8000
meddroid submit --name "Sepsis EWS" --brand "My Clinic" \
  --link https://huggingface.co/your-org/sepsis-ews --public --price 49
```

Base models: `medgemma-4b`, `openbiollm-8b`, `meditron-7b`, `phi3-mini` (or any
Hugging Face repo id). Each keeps its own licence — review before commercial use.

**We store the link, model card and brand — never your weights.** Host the files
on Hugging Face / Kaggle / Drive. Public listings can be monetised; private ones
are invite-only.

Guided, step-by-step version: <https://medicalandroid.com/#/model-studio>

## Publish a Marketplace app (0.2.0+)

Every app in the MedDroid Marketplace is free. Apps run inside MedDroid Providers on the
clinic's computer and store everything in the desktop app's encrypted database through the
app SDK (no browser storage; going online needs the `internet` permission).

```bash
meddroid app init bp-tracker        # meddroid-app.json + App.tsx + type stubs
meddroid app check bp-tracker       # manifest + code rules
meddroid app submit bp-tracker --link https://github.com/you/bp-tracker
```

MedDroid reviews each app against its permissions; approved apps are listed under
"From developers" and ship in the next MedDroid Providers update.
Guide: https://medicalandroid.com/#/developer-docs (Publish an app to the Marketplace).

