JSONSchema Spec with object-oriented paths
Project description
About
JSONSchema Spec with object-oriented paths
Key features
Traverse elements like paths
Access spec on demand with separate dereferencing accessor layer
Installation
$ pip install jsonschema-spec
Alternatively you can download the code and install from the repository:
$ pip install -e git+https://github.com/p1c2u/jsonschema-spec.git#egg=jsonschema_spec
Usage
from jsonschema_spec import Spec
d = {
"openapi": "3.0.1",
"info": {
"$ref": "#/components/Version",
},
"paths": {},
"components": {
"Version": {
"title": "Minimal",
"version": "1.0",
},
},
}
spec = Spec.from_dict(d)
# Concatenate paths with /
info = spec / "info"
# Stat path keys
"title" in info
# Open path dict
with info.open() as info_dict:
print(info_dict)
License
Copyright (c) 2017-2022, Artur Maciag, All rights reserved. Apache-2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jsonschema_spec-0.1.3.tar.gz
(10.6 kB
view hashes)
Built Distribution
Close
Hashes for jsonschema_spec-0.1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3cde007ad65c2e631e2f8653cf187124a2c714d02d9fafbab68ad64bf5745d6 |
|
MD5 | ad46c7edc6e4aef17bdd3a4b9698d6d2 |
|
BLAKE2b-256 | 8d9c9d42976ba3a39e9ad9c8d6cb526bf496d6def9d1eae1ce055f6ceea748cc |