Validating json fails with "No module named 'jsonschema'"
https://github.com/aborrero/python-nftables-tutorial/blob/main/nft-load-example-ruleset.py#L81
Step 2 throws this error: ERROR: failed validating json schema: No module named 'jsonschema'
pip install jsonschema does not fix this issue.
Running on Ubuntu 20.04 LTS with python3-nftables installed via package manager. Python 3.8.
This is likely a problem in libnftables itself. The code does import jsonschema (see http://git.netfilter.org/nftables/tree/py/nftables.py?h=v1.0.2#n31) but that dependency is not declared anywhere in the code. So the pip package likely doesn't include it.
The debian package solves this by explicitly declaring the dependency, see https://salsa.debian.org/pkg-netfilter-team/pkg-nftables/-/blob/debian/1.0.2-1/debian/control#L91
Thanks for the report, I'll forward it to upstream developers.