Public plugin contract for the NeMo Platform - the only package plugin authors need.
Project description
nemo-platform-plugin
Build NeMo Platform plugins in Python.
nemo-platform-plugin is the only package plugin authors install. It re-exports every base class, schema, and helper you need to contribute HTTP services, CLI commands, schedulable jobs, background controllers, typed configuration, and entity types to NeMo Platform. Declare your surfaces in pyproject.toml, install the package, and the platform discovers and mounts them at startup — no registration code required.
What you can build
| Surface | Base class | Entry-point group | Purpose |
|---|---|---|---|
| HTTP service | NemoService |
nemo.services |
Contributes FastAPI routers mounted at /apis/<name>/... |
| CLI | NemoCLI |
nemo.cli |
Contributes nemo <name> <cmd> subcommands |
| Job | NemoJob |
nemo.jobs |
Contributes schedulable, container-executable jobs. Auto-generates run / submit / explain CLI verbs. |
| Controller | NemoController |
nemo.controllers |
Contributes background reconcile-loop controllers |
| Configuration | NemoConfig |
— | Typed plugin configuration with env var / YAML loading |
| Entity | NemoEntity |
— | Entity definitions stored in the NeMo Platform entity store |
Install
pip install nemo-platform-plugin
To run a local NeMo Platform that loads and serves your plugin while you develop, install nemo-platform too — it ships the platform services, the nemo CLI, and the runtime that wires entity-client injection into your plugin's FastAPI app:
pip install "nemo-platform[all]"
A minimal plugin
A complete NeMo Platform plugin that contributes one HTTP route — a pyproject.toml and a service module:
# pyproject.toml
[project]
name = "nemo-my-plugin"
version = "0.1.0"
requires-python = ">=3.11"
dependencies = ["nemo-platform-plugin"]
[project.entry-points."nemo.services"]
"my-plugin" = "nemo_my_plugin.service:MyService"
# [build-system] is required by PEP 517 — without it, pip falls back to
# legacy setuptools. Any modern backend works; hatchling is what NeMo
# Platform itself uses and is the easiest fit for the src/ layout below.
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
# Required because the plugin uses a src/ layout with implicit namespace
# packages (no __init__.py). Hatchling needs to be told where the source is.
[tool.hatch.build.targets.wheel]
packages = ["src/nemo_my_plugin"]
# src/nemo_my_plugin/service.py
from typing import ClassVar
from fastapi import APIRouter
from nemo_platform_plugin.service import NemoService, RouterSpec
class MyService(NemoService):
name: ClassVar[str] = "my-plugin"
dependencies: ClassVar[list[str]] = []
def get_routers(self) -> list[RouterSpec]:
router = APIRouter()
@router.get("/hello")
async def hello() -> dict:
return {"message": "Hello from my plugin!"}
return [RouterSpec(router, tag="My Plugin")]
During development, nemo-platform-plugin is the only dependency your plugin needs. To actually run a local platform that loads your plugin, install nemo-platform[all] (see Install above), then:
pip install -e .
nemo services run
# GET http://localhost:8080/apis/my-plugin/hello → {"message": "Hello from my plugin!"}
That's a complete plugin. Adding a CLI command, a job, a controller, typed configuration, or entities follows the same shape — declare a class, register it under the matching entry-point group, install. See QUICKSTART for the full template covering every surface.
Guides
- QUICKSTART — build your first plugin end-to-end (service + CLI + job + controller + config)
- SERVICE — HTTP routes, CRUD patterns, testing
- JOB — jobs, CLI commands, auto-generated job verbs
- CONTROLLER — reconcile loops, state machines, service principal
- CONFIG — typed configuration, env vars, YAML, test overrides
- ENTITY — entity store, CRUD client, pagination, optimistic locking
- INFERENCE_MIDDLEWARE — inference request/response middleware, typed bodies, response annotations
- ARCHITECTURE — discovery, startup, all surfaces, SDK surface
Tip: These guides also ship inside the installed package at
nemo_platform_plugin/docs/.
Links
- This package source: https://github.com/NVIDIA-NeMo/nemo-platform/tree/main/packages/nemo_platform_plugin
- NeMo Platform on PyPI: https://pypi.org/project/nemo-platform/
- NeMo Platform on GitHub: https://github.com/NVIDIA-NeMo/nemo-platform
- NeMo Platform docs: https://docs.nvidia.com/nemo-platform/
- Issue tracker: https://github.com/NVIDIA-NeMo/nemo-platform/issues
License
nemo-platform-plugin is licensed under the Apache License 2.0. Third-party open-source dependencies have their own licenses; review them before use.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nemo_platform_plugin-0.2.0-py3-none-any.whl.
File metadata
- Download URL: nemo_platform_plugin-0.2.0-py3-none-any.whl
- Upload date:
- Size: 1.7 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da26b54dad4efb25eed79c99f413e447f11281987dd1fb9ca2b9b96832dd1f4a
|
|
| MD5 |
dff561e78215594d242551aa1b7032d2
|
|
| BLAKE2b-256 |
4d89361ef2542bdebe0558a543789e449abcc2006aa800810bc6fbe9cb23c392
|