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
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.0.tar.gz
(10.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file jsonschema-spec-0.1.0.tar.gz.
File metadata
- Download URL: jsonschema-spec-0.1.0.tar.gz
- Upload date:
- Size: 10.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.13 CPython/3.9.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f5ec7a460ceceb381cce40d6f17adcbc866b3f32dc4c8fc8489f1c281459c5ad
|
|
| MD5 |
d8f6b8bf5889f32ea28b14404d8172fa
|
|
| BLAKE2b-256 |
51d9c7dba69f8acab0b403ca7cb4a8a9c3337800453328c138eb81b953ed2f71
|
File details
Details for the file jsonschema_spec-0.1.0-py3-none-any.whl.
File metadata
- Download URL: jsonschema_spec-0.1.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
poetry/1.1.13 CPython/3.9.6 Darwin/21.6.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6713c2add7ee096a8aa0f355d507c4681e5447b2e8aefe1bb141d6204cea4fa2
|
|
| MD5 |
1261b7c4e5e8dc58d72c8515266e91bd
|
|
| BLAKE2b-256 |
a4fac61bd49682f3f49ff8ac079c472e95ffc460ecf8f54a904769fb1314afa5
|