ninjaeval (Python)
Show NinjaEval what happens inside your AI bot (every tool call and LLM call), so it can grade them and show them side by side with production in its debugger. No dependencies.
import ninjaeval
ninjaeval.instrument() # records OpenAI, Anthropic and LiteLLM chat calls automatically
@ninjaeval.tool # records arguments, result or error, and duration
def get_order(order_id: str): ...
@app.post("/chat")
def chat(req):
with ninjaeval.capture(req.headers) as run: # active only for NinjaEval test requests
reply = agent.run(req.message)
return run.attach({"reply": reply}) # adds the "ninjaeval" block for tests, nothing otherwise
- Tests only. NinjaEval marks its requests with
X-NinjaEval-Test. Without that header, every hook does nothing and your response is unchanged. - Never breaks your app. Errors inside the SDK are swallowed, and your tools' own errors are recorded and re-raised as usual.
- Redaction.
capture(headers, redact=lambda text: mask_emails(text))is applied to everything recorded. - Other clients: call
ninjaeval.record_turn(model=..., messages_in=..., output=..., tool_calls=[...], prompt_tokens=..., completion_tokens=..., latency_ms=...)yourself. - OpenTelemetry (optional): with
pip install "ninjaeval[otel]", each tool and LLM call is also a span, a child of the test'straceparent. - Works with sync and async code (FastAPI, Flask, Django, Starlette). Contract: the
ninjaevalblock v1.
Metadata
Release files for ninjaeval 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ninjaeval-0.1.0.tar.gz | 7.9 kB | With provenance | Details for ninjaeval-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ninjaeval-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for ninjaeval-0.1.0-py3-none-any.whl |
Total release size: 15.0 kB
Release files / ninjaeval-0.1.0.tar.gz
| Download URL | ninjaeval-0.1.0.tar.gz |
|---|---|
| Size | 7.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2c52baeea4ee8f3f766faae51471a2c11ad4218ef6b31f7da4fdba120911ab65
|
|
BLAKE2b-256 checksum How to use checksums |
e2dc2f7d0413709aec825b8ca36230bf0ad84fc9ad8a84532003f0b76578ea4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logRelease files / ninjaeval-0.1.0-py3-none-any.whl
| Download URL | ninjaeval-0.1.0-py3-none-any.whl |
|---|---|
| Size | 7.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c7066215a7a1ab38206509986474627c419f5c5d9ddc973d4e1088f0e54732db
|
|
BLAKE2b-256 checksum How to use checksums |
73d4664f9bdb55e16266719739cb097f2ec10a5c6ec35caaa2c3606f2d02acda
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logSecurity for ninjaeval 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ninjaeval-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 23, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.