Jupyter SMART on FHIR
Prototype extensions for loading credentials in Jupyter contexts via SMART on FHIR.
This package contains two implementations:
server_extension: a Jupyter server extension that acts as public client for a SMART server.hub_service: a JupyterHub service that acts as confidential client for a SMART server and performs asymmetric authentication.
Check the READMEs in the example folders for more information.
This package is very much a work in progress.
Server Extension
The Server extension is enabled by default on install. It registers the following handlers:
{base_url}/smart-on-fhir/launch- the launch URL to provide{base_url}/smart-on-fhir/login(an intermediate implementation-detail handler that may go away){base_url}/smart-on-fhir/callback- the OAuth callback you'll want to register
When deployed in JupyterHub, register the URLs https://jupyterhub.example.org/hub/user-redirect/smart-on-fhir/launch as the launch URL and https://jupyterhub.example.org/hub/user-redirect/smart-on-fhir/callback as the oauth callback URL.
After SMART launch, the token info will be stored in jupyter_runtime_dir() / "smart_token.json" (also available to notebooks as $SMART_TOKEN_FILE), and in $SMART_TOKEN.
$SMART_TOKEN will only be available to notebooks started after
Currently, only one token is stored at a time, so if there are multiple smart launches to a single notebook server, only the latest will be persisted.
Configure SMARTExtensionApp in jupyter_server_config.py:
c.SMARTExtensionApp.scopes = ["openid", "fhirUser", "launch", "patient/*.*"]
c.SMARTExtensionApp.client_id = "your-client-id"
see sourcecode in server_extension.py for now for more options.
Server Extension Authentication
By setting:
c.ServerApp.identity_provider_class = "jupyter_smart_on_fhir.server_extension.SMARTIdentityProvider"
the SMART launch process will be used to authenticate access to all of Jupyter Server. Only browsers that have completed the SMART launch process will be able to make any requests to the server, and the latest SMART launch token may be used as a Bearer token to communicate with the Jupyter Server.
JupyterHub Service
The JupyterHub service is a bare proof of concept which completes the SMART flow and fetches some sample data, it is not useful yet.
Metadata
Release files for jupyter-smart-on-fhir 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| jupyter_smart_on_fhir-0.2.0.tar.gz | 22.0 kB | With provenance | Details for jupyter_smart_on_fhir-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| jupyter_smart_on_fhir-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for jupyter_smart_on_fhir-0.2.0-py3-none-any.whl |
Total release size: 34.3 kB
Release files / jupyter_smart_on_fhir-0.2.0.tar.gz
| Download URL | jupyter_smart_on_fhir-0.2.0.tar.gz |
|---|---|
| Size | 22.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7cb69fdecbc60a17ba7b219574074f8a27bc89a04d55f9c70130c46d6ddcdd9f
|
|
BLAKE2b-256 checksum How to use checksums |
71e9a67dbf8aa9456baaca38968cc3c023823fd486d9977bf641c61eb8f1bdcf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logRelease files / jupyter_smart_on_fhir-0.2.0-py3-none-any.whl
| Download URL | jupyter_smart_on_fhir-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5a9e48d0d157d3a5afbe6648043e25ddd3eccde901e0272f55487a9baa616407
|
|
BLAKE2b-256 checksum How to use checksums |
17e95efe37828965323d1193bd01ecf95780f69023cba69c33ad28862879c44b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logSecurity for jupyter-smart-on-fhir 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for jupyter_smart_on_fhir-0.2.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 2, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.