Skip to content

Commit

Permalink
Update Python example
Browse files Browse the repository at this point in the history
  • Loading branch information
Zsailer committed Jan 4, 2024
1 parent 1ad7b18 commit 0b48a34
Showing 1 changed file with 25 additions and 1 deletion.
26 changes: 25 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ https://schema.jupyter.org/[subproject]/[schema-path]/[version].json

## Install

The package included in this repo installs all of Jupyter's core schemas in
Jupyter's data directory, e.g. under `share/jupyter/schemas/`.

Install this package using:
```
pip install jupyter-schemas
```

This package also includes small Python package for fetching these schemas

For example, to get a list of all installed schemas, try:
```python
import jupyter_schemas

print(jupyter_schemas.list_schemas())
```
pip install jupyter-schema

You can fetch the contents of a schemas from disk using:
```python
# Use the schema's URI to find it
uri = "https://schema.jupyter.org/jupyter_server/events/contents_service/v1"

# Load the schema
print(jupyter_schemas.get_jupyter_schema(uri))
```


0 comments on commit 0b48a34

Please sign in to comment.