Skip to main content
https://img.shields.io/pypi/v/jsonschema-spec.svg https://travis-ci.org/p1c2u/jsonschema-spec.svg?branch=master https://img.shields.io/codecov/c/github/p1c2u/jsonschema-spec/master.svg?style=flat https://img.shields.io/pypi/pyversions/jsonschema-spec.svg https://img.shields.io/pypi/format/jsonschema-spec.svg https://img.shields.io/pypi/status/jsonschema-spec.svg

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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jsonschema_spec-0.1.0-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

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

Hashes for jsonschema-spec-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f5ec7a460ceceb381cce40d6f17adcbc866b3f32dc4c8fc8489f1c281459c5ad
MD5 d8f6b8bf5889f32ea28b14404d8172fa
BLAKE2b-256 51d9c7dba69f8acab0b403ca7cb4a8a9c3337800453328c138eb81b953ed2f71

See more details on using hashes here.

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

Hashes for jsonschema_spec-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6713c2add7ee096a8aa0f355d507c4681e5447b2e8aefe1bb141d6204cea4fa2
MD5 1261b7c4e5e8dc58d72c8515266e91bd
BLAKE2b-256 a4fac61bd49682f3f49ff8ac079c472e95ffc460ecf8f54a904769fb1314afa5

See more details on using hashes here.

Release history Release notifications | RSS feed

0.2.4

2 files

0.2.3

2 files

0.2.2

2 files

0.2.1

2 files

0.2.0

2 files

0.1.6

2 files

0.1.5

2 files

0.1.4

2 files

0.1.3

2 files

0.1.2

2 files

0.1.1

2 files

This release

0.1.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page