Skip to content

Commit 2ac067f

Browse files
committed
Very basic usage info.
1 parent aec21f5 commit 2ac067f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

docs/index.rst

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,23 @@
22

33
Resources are exposed via a `referencing.Registry`.
44

5+
Usage
6+
-----
7+
8+
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.
9+
10+
For full details on using it, see the `referencing documentation <referencing:intro>`, but for example:
11+
12+
.. code::
13+
14+
from jsonschema_specifications import REGISTRY as SPECIFICATIONS
15+
16+
DRAFT202012_DIALECT_URI = "https://json-schema.org/draft/2020-12/schema"
17+
print(SPECIFICATIONS.contents(DRAFT202012_DIALECT_URI))
18+
19+
# -> prints the Draft 2020-12 meta-schema
20+
21+
522
Contents
623
--------
724

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ Issues = "https://github.com/python-jsonschema/jsonschema-specifications/issues/
4343
Funding = "https://github.com/sponsors/Julian"
4444
Source = "https://github.com/python-jsonschema/jsonschema-specifications"
4545

46+
[tool.doc8]
47+
ignore = [
48+
"D001", # one sentence per line, so max length doesn't make sense
49+
]
50+
4651
[tool.isort]
4752
combine_as_imports = true
4853
from_first = true

0 commit comments

Comments
 (0)