Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

schemata-validator-py

Test

Python validator for Nostr protocol JSON schemas. Built on top of schemata-py and jsonschema.

When to use this

JSON Schema validation is not suited for runtime hot paths. Use this in CI and integration tests.

Usage

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.errors

License

GPL-3.0-or-later

About

Nostr protocol JSON schema schemata-validator-py

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages