Skip to main content

nemo-platform-plugin

License Python Docs

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, use Python 3.12–3.13 and 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.12"
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

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.

Metadata

Release files for nemo-platform-plugin 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for nemo-platform-plugin 0.5.0
File Interpreter ABI Platform
nemo_platform_plugin-0.5.0-py3-none-any.whl Python 3 none any Details

Release files / nemo_platform_plugin-0.5.0-py3-none-any.whl

Download URL nemo_platform_plugin-0.5.0-py3-none-any.whl
Size 3.8 MB
Tags Python 3
SHA-256 checksum
How to use checksums
2b433e1f650b1e1ec2351d8f8cd2d9daa9eb0579d05063f2f49af7fc0a262810
BLAKE2b-256 checksum
How to use checksums
e02ab3bdeacc8a49cabc2dc7b6f697d13989545ddf6bc18b930acd0ede91f768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.7

Release history Release notifications | RSS feed

0.6.0

1 release file

0.5.1

1 release file

This release

0.5.0 This release

1 release file

0.4.0

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

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