Resources
Agent skill:
nitrostack-python-tools-resources-prompts
Python
from nitrostack import injectable, resource, ExecutionContext
@injectable(deps=[DuffelService])
class FlightResources:
def __init__(self, service: DuffelService):
self.service = service
@resource(
uri="flight://popular-routes",
name="Popular Flight Routes",
description="Information about popular routes and pricing",
mime_type="application/json",
)
async def popular_routes(self, context: ExecutionContext) -> dict:
return {"routes": [...]}
List the class on the feature module controllers. Optional annotations: ResourceAnnotations. Widget HTML is also registered as ui://widget/{route}.html when you use @widget.