Structured JSON Output In Python
Prompt:
Use nxusKit to add structured JSON output to this Python app.Starter fixture: examples/fixtures/starters/python-app/
Expected behavior:
- Inspect
pyproject.tomland the package layout before editing. - Consult the
structured-outputexample. - Add a typed schema plus validation.
- Keep provider configuration in environment variables or project config.
- Include an offline or fixture-driven parsing smoke if a model is unavailable.
Verification:
python -m py_compile src/example_app/__init__.py src/example_app/__main__.pypython -m example_app --provider offlineGood result:
- The output is valid JSON that matches the declared schema.
- Real provider use is optional and explicitly configured.