Skip to content

Commit

Permalink
Very basic usage info.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julian committed Mar 20, 2023
1 parent aec21f5 commit 2ac067f
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
17 changes: 17 additions & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,23 @@

Resources are exposed via a `referencing.Registry`.

Usage
-----

There is essentially one main object provided, `jsonschema_specifications.REGISTRY`, which is a `referencing.Registry` (or more specifically a `referencing.jsonschema.SchemaRegistry`) containing all of the "official" JSON Schemas.

For full details on using it, see the `referencing documentation <referencing:intro>`, but for example:

.. code::
from jsonschema_specifications import REGISTRY as SPECIFICATIONS
DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema"
print(SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI))
# -> prints the Draft 2020-12 meta-schema
Contents
--------

Expand Down
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,11 @@ Issues = "https://github.com/python-jsonschema/jsonschema-specifications/issues/
Funding = "https://github.com/sponsors/Julian"
Source = "https://github.com/python-jsonschema/jsonschema-specifications"

[tool.doc8]
ignore = [
"D001", # one sentence per line, so max length doesn't make sense
]

[tool.isort]
combine_as_imports = true
from_first = true
Expand Down

0 comments on commit 2ac067f

Please sign in to comment.