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-2.0

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 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.3-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file jsonschema_spec-0.1.3.tar.gz.

File metadata

  • Download URL: jsonschema_spec-0.1.3.tar.gz
  • Upload date:
  • Size: 10.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1031-azure

File hashes

Hashes for jsonschema_spec-0.1.3.tar.gz
Algorithm Hash digest
SHA256 8d8db7c255e524fab1016a952a9143e5b6e3c074f4ed25d1878f8e97806caec0
MD5 5b5e702fc98626841a731b591a8fff30
BLAKE2b-256 e441a345820b5d426d6a6c37749607aa034691d945ec1d3c948d559a6b4d7e56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: jsonschema_spec-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-1031-azure

File hashes

Hashes for jsonschema_spec-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b3cde007ad65c2e631e2f8653cf187124a2c714d02d9fafbab68ad64bf5745d6
MD5 ad46c7edc6e4aef17bdd3a4b9698d6d2
BLAKE2b-256 8d9c9d42976ba3a39e9ad9c8d6cb526bf496d6def9d1eae1ce055f6ceea748cc

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

This release

0.1.3 This release

2 files

0.1.2

2 files

0.1.1

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