Skip to content

Commit

Permalink
ext: Add md passthrough
Browse files Browse the repository at this point in the history
  • Loading branch information
tmc committed Apr 14, 2024
1 parent da03302 commit 5c20d49
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions brevmakesjupyterlookbetter/__init__.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,31 @@
from ._version import __version__

import os
import json
import tornado
from jupyter_server.base.handlers import JupyterHandler


def _jupyter_labextension_paths():
return [{
"src": "labextension",
"dest": "brevmakesjupyterlookbetter"
}]


def _jupyter_server_extension_paths():
return [{
"module": "brevmakesjupyterlookbetter"
}]


class BMJLBExtensionHandler(JupyterHandler):
def get(self):
# print VERB_ env vars:
self.finish(json.dumps({
k: v for k, v in os.environ.items() if k.startswith("VERB_")
}))

def _load_jupyter_server_extension(serverapp):
handlers = [("/brevmakesjupyterlookbetter", BMJLBExtensionHandler)]
serverapp.web_app.add_handlers(".*$", handlers)

0 comments on commit 5c20d49

Please sign in to comment.