Overview

API reference for the NitroStack TypeScript and Python SDKs

This section documents the public API of both NitroStack SDKs: every decorator, the pipeline interfaces, the execution context, and the CLI commands. Each page shows TypeScript first, with the Python equivalent in a tab wherever one exists. Pick a language once and every tab on the site follows it.

TypeScript and Python at a glance

Both SDKs share the same mental model (modules, controllers, providers, and a request pipeline), but the APIs follow each language's conventions. Don't copy TypeScript examples into a Python project, or the other way around.

TypeScriptPython
Package@nitrostack/corenitrostack (pip install nitrostack)
CLInitrostack-cli (@nitrostack/cli)nitrostack-py (also python -m nitrostack.cli.main)
DecoratorsPascalCase: @Tool, @Module, @Injectablesnake_case: @tool, @module, @injectable
Input schemasZod (z.object(...))Pydantic v2 BaseModel as input_schema
Dependency injectionConstructor parameter types@injectable(deps=[ServiceA, ServiceB]) + constructor args
Pipeline@UseGuards / @UseMiddleware / @UseInterceptors / @UsePipes / @UseFiltersuse_guards / use_middleware / use_interceptors / use_pipes / use_filters
WidgetsNext.js app in src/widgetsStatic HTML under widgets/out/{route}.html + @widget
Build stepnitrostack-cli buildNone (nitrostack-py has no build command)

Reference

On this page