Python validator for Nostr protocol JSON schemas. Built on top of schemata-py and jsonschema.
JSON Schema validation is not suited for runtime hot paths. Use this in CI and integration tests.
from schemata_validator import validate_note
event = {"id": "aa...", "pubkey": "bb...", "created_at": 1700000000, "kind": 1, "tags": [], "content": "hello", "sig": "cc..."}
result = validate_note(event)
assert result.valid, result.errorsGPL-3.0-or-later