Skip to main content

modelc

A ready-to-run Python CLI skeleton for portable, inspectable AI model containers.

This project implements a practical v0 of the modelc specification with:

  • modelc build
  • modelc run
  • modelc inspect

It supports:

  • manifest parsing from model.yaml
  • packaging local projects into .modelc.tar.gz
  • running local projects or packaged artifacts
  • input/output schema validation
  • a simple Python entrypoint contract using stdin and stdout

Quick start

1. Create a virtual environment

python -m venv .venv

Activate it:

macOS / Linux

source .venv/bin/activate

Windows

.venv\Scripts\Activate.ps1

2. Install dependencies

pip install -e .

3. Try the example

Inspect the example:

modelc inspect examples/sentiment-basic

Build it:

modelc build examples/sentiment-basic

Run it from source:

modelc run examples/sentiment-basic --input '{"text":"I love this"}'

Run it from the built package:

modelc run examples/sentiment-basic/dist/sentiment-basic-0.1.0.modelc.tar.gz --input '{"text":"This is bad"}'

Manifest shape

apiVersion: modelc.dev/v0
kind: ModelContainer

metadata:
  name: sentiment-basic
  version: 0.1.0
  description: Basic sentiment classifier

runtime:
  type: python
  version: "3.11"
  dependencies: []

artifacts:
  weights:
    path: ./model/
    format: pytorch

  tokenizer:
    path: ./tokenizer/
    format: huggingface

interface:
  input:
    type: text
    schema:
      text: string

  output:
    type: classification
    schema:
      label: string
      confidence: float

entrypoint:
  command: python run.py

Entrypoint contract

The entrypoint must:

  • read JSON from stdin
  • write JSON to stdout
  • write logs/errors to stderr
  • exit non-zero on failure

Notes

This is a deliberately small v0 implementation.

It does not:

  • create virtual environments
  • install dependencies automatically
  • support non-Python runtimes
  • provide remote registry support
  • implement signing or provenance

License

MIT

Metadata

Release files for modelc 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 modelc 0.1.0
File Size Uploaded Provenance
modelc-0.1.0.tar.gz 9.4 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 20.0 kB

Release files / modelc-0.1.0.tar.gz

Download URL modelc-0.1.0.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6abfc669a165594556dc7d45e99f50543b29bcb98ddbdceb98957c75f443e28e
BLAKE2b-256 checksum
How to use checksums
00d171aa4c24d2f7a96c20f4f0a043b2cd54738bf9afcf4494294b9e21aecf3e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

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

Download URL modelc-0.1.0-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ff0a4bb8eb1f531417e40a8b68699d1569a26d8e5236b038f70d6b991ef0683e
BLAKE2b-256 checksum
How to use checksums
bf00dcdab54fb9c292dd92e86f058f17b615066b36ed80b2562d7c427a4cb9c1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.5

Security for modelc 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

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