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.1.tar.gz (10.3 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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file jsonschema-spec-0.1.1.tar.gz.

File metadata

  • Download URL: jsonschema-spec-0.1.1.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.6 Linux/5.15.0-1017-azure

File hashes

Hashes for jsonschema-spec-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2eaf5d20c017921950df53d898e0e85029901d83c28730f0fa20813648c7af22
MD5 28a5e3cf1a684c8131ce11dca494166d
BLAKE2b-256 b4d85dfd308cd86ad649bb9278185af3b89259c59d012d0d8929734b580f4015

See more details on using hashes here.

File details

Details for the file jsonschema_spec-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: jsonschema_spec-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.15 CPython/3.10.6 Linux/5.15.0-1017-azure

File hashes

Hashes for jsonschema_spec-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 5fa06f740d81de4a46d51ffb847ea381d09c4a5872bf0f17d7e0d4bd862d687b
MD5 08c17ed4affa3705f37d4636fd6a05fa
BLAKE2b-256 eeb88773d7b77398f5133ddfa3a618727682560c468f7d799ac6799133c37704

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

This release

0.1.1 This release

2 files

0.1.0

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