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 v2
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.1.tar.gz
(10.3 kB
view hashes)
Built Distribution
Close
Hashes for jsonschema_spec-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fa06f740d81de4a46d51ffb847ea381d09c4a5872bf0f17d7e0d4bd862d687b |
|
MD5 | 08c17ed4affa3705f37d4636fd6a05fa |
|
BLAKE2b-256 | eeb88773d7b77398f5133ddfa3a618727682560c468f7d799ac6799133c37704 |