Saravanan666/pypi-org huggingface dataset:
Package: jupyterhub-outpostspawner
OutpostSpawnerThe OutpostSpawner in combination with theJupyterHub Outpost serviceenables JupyterHub to spawn single-user notebook servers on multiple remote resources.DocumentationLink todocumentation.OverviewThe JupyterHub community created many usefulJupyterHub Spawnerover the past years, to allow JupyterHub to use the specific resources of different systems. For most of these Spawners JupyterHub has to run at the system itself. The OutpostSpawner enables the use of these Spawners on remote systems.Other Spawners likeSSHSpawnercan spawn single-user servers on remote systems, but are not able to use system-specific features likeKubeSpawnerorBatchSpawner.The JupyterHub Outpost service in combination with the OutpostSpawner enables a single JupyterHub to offer multiple remote systems of different types.Use one JupyterHub to offer single-user servers on multiple systems.Each system may use a different JupyterHub Spawner.Integrated SSH port forwarding solution to reach remote single-user server.supports the JupyterHubinternal_sslfeature.shows events gathered by the remote Spawner to the user.Users can override the configuration of the remote Spawner at runtime (e.g. to select a different Docker Image).One JupyterHub Outpost can be connected to multiple JupyterHubs, without interfering with each other.RequirementsJupyterHub must run on a Kubernetes Cluster (recommended is the use of Zero2JupyterHub).The JupyterHub Outpost must fulfill the requirements of the configured Spawner class.
Package: jupyterhub-passthroughauth
jupyterhub-passthroughauthPass-through authentication for jupyterhub, enabling direct access to the session of a particular locked down user.The plugin (if installed and configured) could disable the standard form-based authentication of jupyterhub and provides direct access to the session from a particular user specified via config.
Think of this as a jupyterhub-singleuser functionality on a standard jupyterhub without the requirement of using tokens or passwords to gain access.
This kind of module is very useful if you like to provide guest access to your jupyterhub from a particular user or continue to use the standard PAM authentication just by flipping a switch in the configInstallationpip(3) install jupyterhub-passthroughauthConfigurationjupyterhub_config.pyc.JupyterHub.authenticator_class='passthroughauth.PassThroughAuthenticator'c.PassThroughAuthenticator.guest_user='ubuntu'c.Authenticator.auto_login=True# Disables PAM login completely, use False otherwiseAccessIf the regular path/is accessed:Login page will be displayed if auto_login flag is set toFalseGuest session page will be displayed if auto_login flag is set toTrue
Package: jupyterhub-roothooks
jupyterhub-roothooksRun hooks as root before starting user server.Why?When runningJupyterHub on Kubernetes, you want user pods to
run as non-root users. This is good security practice, and can seriously reduce blast
radius in case of compromised. For example, if you run your containers withprivileged: True,
a compromise of a user server will likely be able to take control of your entire kubernetes
cluster, and depending on how it's configured, your cloud account! Nobody wants that.However, what peopledowant is to be able to run some commands as rootbeforethe
user server starts. Often, this is to do somemountingstuff, although there are other use cases too.So the goal would be to:Run some commands as rootbeforethe user server startsThese commands failing shouldnotcause the server to not start. This mostly shows
the user a useless 'your server has failed to start' error. In most cases, it is
better to start the server and provide some logging so the user can investigate what
went wrong.jupyterhub-roothooksis designed to solve this very specific problem.How?Prepare the image: With repo2dockerrepo2dockeris a common way to build images for
use with JupyterHub, sojupyterhub-roothooksspecifies some defaults that make it
easy to integrate with repo2docker.Installjupyterhub-roothooksinto your container, by adding it to yourrequirements.txtfile or underpip:in yourenvironment.ymlfile.Add aroothooks.ddirectory to your repo.Add scripts you want executed as root inside theroothooks.ddirectory. These will
be executed insorted order, so you can clarify the ordering by prefixing them with
numbers like01-first-script.sh,02-second-script.sh.Make sure these scripts are marked as executable (withchmod +x <script-name>), and
have an appropriateshebang.Add astartscript that looks like this:#!/bin/bash -lexecjupyterhub-roothooks--uid1000--gid1000--"$@"This will startjupyterhub-roothooks, which will execute any executable scripts it
finds inroothooks.d, and then run the appropriate command to start the user server
(passed in via$@) with the non-root uid 1000 and gid 1000.z2jh configurationNow that the image is prepared, you can grant elevated root capabilities to the user pod
via z2jh config. Note that while the container will have these capabilities, the user
server itself will not.jupyterhub-roothookswill drop these capabilities before starting
the user server.hub:config:KubeSpawner:container_security_context:# Run the container *truly* as privileged. This can be very dangerous,# but is required for doing most filesystem mountsprivileged:truerunAsUser:0allowPrivilegeEscalation:truecapabilities:add:-SYS_ADMIN
Package: jupyterhub-saml-auth
Jupyterhub SAML AuthAuthenticate your Jupyterhub users using SAML. This authenticator uses OneLogin'spython3-samlpackage as a backend API for handling SAML authentication.Installationpipinstalljupyterhub-saml-authConfigurationSee thejupyterhub_config.pyexample configuration below for how to integrate this package with jupyterhubdefextract_username(acs_handler,attributes):email=attributes['email'][0]username=email.split('@')[0]returnusername# The configuration path is for OneLogin's python3-saml package. This directory is where# settings.json & advanced_settings.json go. See https://github.com/onelogin/python3-saml# for more info about thisc.SAMLAuthenticator.saml_settings_path='/app/etc'# The cookies that your IdP uses for maintaining a login session. These will be cleared# once the user hits 'logout'c.SAMLAuthenticator.session_cookie_names={'PHPSESSIDIDP','SimpleSAMLAuthTokenIdp'}# Function that extracts the username from the SAML attributes.c.SAMLAuthenticator.extract_username=extract_username# register the SAML authenticator with jupyterhubc.JupyterHub.authenticator_class='jupyterhub_saml_auth.SAMLAuthenticator'Environment variablesSAML_HTTPS_OVERRIDE: setting this will override the automatic detection ofhttporhttpsto/hub/acsroute and will set it to onlyhttps.DevelopmentPrerequisite softwaredockerdocker composepython3Firefox or ChromeCreate a development environment# at project rootpython3-mvenv.sourcebin/activate
pipinstall-rrequirements.txt# OPTIONAL, install package if developing source codepipinstall-e.
pytesttest/unit# run the unit testsTest the authentication processThe acceptance test starts the application as a Docker container. Start the containers withdocker compose up -dprior to running the acceptance test with the commandpytest test/test_acceptance.py. Seeconftest.pyfor a list of command line switches/flags to run the acceptance tests.Kill your docker environmentTo kill the docker containers, run the commanddocker compose downat the project root.Referenceshttps://github.com/onelogin/python3-samlhttps://goteleport.com/blog/how-saml-authentication-works/https://medium.com/@BoweiHan/elijd-single-sign-on-saml-and-single-logout-624efd5a224https://medium.com/disney-streaming/setup-a-single-sign-on-saml-test-environment-with-docker-and-nodejs-c53fc1a984c9
Package: jupyterhub-share-link-serverextension
# jupyterhub-share-link-labextensionAdds UI for sharing notebooks across Hub and a very simple server extension to
support it.This works in cooperation with a Hub Service,
[jupyterhub-share-link](https://github.com/danielballan/jupyterhub-share-link).## PrerequisitesJupyterLab## Installation`bash jupyter labextension installjupyterhub-share-link-labextension`## DevelopmentFor a development install (requires npm version 4 or later), do the following in the repository directory:`bash npm install npm run build jupyter labextension link . `To rebuild the package and the JupyterLab app:`bash npm run build jupyter lab build `
Package: jupyterhub-sphinx-theme
The JupyterHub Documentation ThemeA lightweight theme built on the PyData Sphinx Theme, for use by the JupyterHub community.
It makes minimal changes to thepydata-sphinx-themein order to standardize styles and a top-bar that can be shared across all JupyterHub documentation.Defaults this theme setsThis theme sets a few default values to standardize the look and feel across JupyterHub documentation.If there are other standard features/customizations that would be helpful across the JupyterHub team documentation, we can probably add it here so please open an issue to discuss.Here is a brief summary:StyleSets the primary color to a slightly-darkened "Jupyter orange"Removes primary color from headers and makes them bold to be noticeableAligns the header links to the leftLogo and brandingAdds a light/dark mode JupyterHub logoAdds a faviconAdds icon links for our Discourse, Team Compass, and Jupyter.orgExtensionssphinx-copybuttonfor copy buttons in our code cells.sphinxext-opengraphfor OpenGraph protocol metadata.site_urlwill automatically be detected viaReadTheDocsorGitHub Actionsenvironment variables in CI/CD.How to use this themeFollow these steps:Add this theme to thepipinstall requirements of the repo.
For now, point it to themainbranch like so:# in requirements.txt
git+https://github.com/jupyterhub/jupyterhub-sphinx-themeor to install locally$pipinstallgit+https://github.com/jupyterhub/jupyterhub-sphinx-themeConfigure the Sphinx docs to use the theme by editingconf.py:caption: conf.py

html_theme = "jupyterhub_sphinx_theme"Add it to your theme's extensions::caption: conf.py

extensions = [
   "jupyterhub_sphinx_theme"
]Make customizations on top of these defaultsYou can make customizations on top of the defaults in this theme.
Seethe PyData theme documentationfor guidance on what is possible.In general, this theme only sets defaults, and you can override whatever you like.Developer documentationTheme build systemThis theme uses thesphinx-theme-buildertool, which is a helper tool for automatically compiling Sphinx theme assets.
This will download a local copy of NodeJS and build the theme's assets with the environment specified inpackage.json.Theme structureThis theme follows thesphinx-theme-builderfilesystem layout.Build the theme locallyYou can build the documentation for this theme to preview it.
The easiest way to build the documentation in this repository is to usethenoxautomation tool, a tool for quickly building environments and running commands within them.
This ensures that your environment has all the dependencies needed to build the documentation.To do so, follow these steps:Installnox$pipinstallnoxBuild the documentation:$nox-sdocsThis should create a local environment in a.noxfolder, build the documentation (as specified in thenoxfile.pyconfiguration), and the output will be indocs/_build/html.To build live documentation that updates when you update local files, run the following command:$nox-sdocs-liveMake a releaseFollow the instructions inRELEASE.md
Package: jupyterhub-tmpauthenticator
Temporary JupyterHub AuthenticatorSimple authenticator forJupyterHubthat gives anyone who visits the home page a user account without having to
log in using any UI at all. It also spawns a single-user server and directs
the user to it immediately, without them having to press a button.Built primarily to help runtmpnbwith JupyterHub.Installationpip install jupyterhub-tmpauthenticatorShould install it. It has no additional dependencies beyond JupyterHub.You can then use this as your authenticator by adding the following line to
yourjupyterhub_config.py:c.JupyterHub.authenticator_class="tmp"Configurationtmpauthenticatordoes not have a lot of configurable knobs, but will respect
many relevant config options in thebase JupyterHub Authenticator class.
Here are a few that are particularly useful.TmpAuthenticator.auto_loginBy default,tmpauthenticatorwill automatically log the user in as soon
as they hit the landing page of the JupyterHub, without showing them any UI.
This behavior can be turned off by settingTmpAuthenticator.auto_logintoFalse, allowing a home page to be shown. There will be aSign inbutton here
that will automatically authenticate the user.c.TmpAuthenticator.auto_login=FalseTmpAuthenticator.login_serviceIfauto_loginis set toFalse, the value ofTmpAuthenticator.login_servicewill determine the text shown next toSign inin the default home page. It
defaults toAutomatic Temporary Credentials, so the button will read asSign in with Automatic Temporary Credentials`.c.TmpAuthenticator.auto_login=Falsec.TmpAuthenticator.login_service="your inherent worth as a human being"
Package: jupyterhub-tmpnativeauthenticator
Native AuthenticatorThis is a relatively simple authenticator for small or medium-sizedJupyterHubapplications. Signup and authentication are implemented as native to JupyterHub without relying on external services.NativeAuthenticator provides the following features:New users can signup on the system;New users can be blocked from accessing the system awaiting admin authorization;Option of enforcing password security by disallowing common passwords or requiring a minimum password length;Option to block users after a set number of failed login attempts;Option of open signup without need for initial authorization;Option of asking more information about users on signup (e-mail).Option of requiring users to agree with given Terms of Service;Option of protection against scripting attacks via reCAPTCHA;Option for users with an org-internal e-mail address to self-approve via secure link;DocumentationThe latest documentation is always on readTheDocs, availablehere.Running testsTo run the tests locally, you can install the development dependencies like so:pipinstall-rdev-requirements.txtThen run tests with pytest:pytest
Package: jupyterhub-traefik-proxy
JupyterHub Traefik ProxyWhen JupyterHub starts a server for a user, it willdynamically configure a
proxy serverso that accessingjupyterhub.example.com/user/<user>routes to
the individual Jupyter server. This project contains what JupyterHub need to
dynamically configure the routes of atraefikproxy
server! There are three implementations of theJupyterHub proxy
API,
depending on how traefik store its routing configuration.Forsmaller, single-node deployments:TraefikFileProviderProxyFordistributedsetups:TraefikEtcdProxyTraefikConsulProxyInstallationThedocumentationcontains acomplete installation
guidewith examples for the three different implementations.For TraefikFileProviderProxyFor TraefikEtcdProxyFor TraefikConsulProxyRunning testsThere are some tests that useetcdctlcommand line client for etcd. Make sure
to set environment variableETCDCTL_API=3before running the tests, so that
the v3 API to be used, e.g.:$ export ETCDCTL_API=3You can then run the all the test suite from thetraefik-proxydirectory with:$ pytest -v ./testsOr you can run a specific test file with:$ pytest -v ./tests/<test-file-name>
Package: jupyterhub-url-sharing
jupyterhub_url_sharingA JupyterLab extension.RequirementsJupyterLab >= 3.0InstallTo install the extension, execute:pipinstalljupyterhub_url_sharingUninstallTo remove the extension, execute:pipuninstalljupyterhub_url_sharingContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the jupyterhub_url_sharing directory# Install package in development modepipinstall-e"."# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseDevelopment uninstallpipuninstalljupyterhub_url_sharingIn development mode, you will also need to remove the symlink created byjupyter labextension developcommand. To find its location, you can runjupyter labextension listto figure out where thelabextensionsfolder is located. Then you can remove the symlink namedjupyterhub-url-sharingwithin that folder.Packaging the extensionSeeRELEASE
Package: jupyter-iam
🪐 🛂 Jupyter IAMIdentity and Access Management for Jupyter.Jupyter IAM is responsible for the identity and access management to the Jupyter experience developed by Datalayer.Developpipinstall-e.[test]jupyterlabextensiondevelop.--overwrite
jupyterlabextensionlist
jupyterserverextensionlist
yarnjupyterlab
Package: jupyter-inheritance
Jupyter InheritanceInherit Jupyter KernelsYou have a notebookbase.ipynbwith a cellimportosfromdatetimeimportdatetimeclassTest:msg="Hey!"defadd(x,y):returnx+ytest=Test()now=datetime.now()that has been executed. You can create a new notebook and run the following code:fromjupyter_inheritanceimportinherit_frominherit_from("base.ipynb")assertadd(1,4)==5assertisinstance(test,Test)print(test.msg)print(now)# same value as `now` in `base.ipynb`!print(os.listdir("."))Thebase.ipynbcontent is not executed from scratch in the new notebook,
all the existing objects are copied directly frombase.ipynbkernel. This
ensures that everything stays exactly the same (e.g. timestamps, random numbers,
responses from externals APIs).You can even do mixins!fromjupyter_inheritanceimportinherit_fromfornotebookin("base_1.ipynb","base_2.ipynb"):inherit_from(notebook)InstallationJust the usualpipinstalljupyter-inheritance
Package: jupyter-innotater
jupyter_innotaterAn Inline Data Annotator for JupyterRequirementsJupyterLab >= 3.0Installpipinstalljupyter_innotaterContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the jupyter_innotater directory# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmrunbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm run buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseUninstallpipuninstalljupyter_innotater
Package: jupyter-interactive
jupyter-interactiveInitialise a Jupyter notebook with useful extensions and reasonable defaults.Usage%load_ext jupyter_interactiveFeaturesEnableautoimportof missing
modules.Enable the%autoreloadkeyword to reload all modules in the current session.Enable the%%Rand%%coconutmagic to execute specific cells usingRandCoconut.Configure plot output formatting:Display Matplotlib plots as interactive, resizable widgets (usingipympl).Display Matplotlib plots at a higher resolution.Zoom in and out of Plotly figures using the mouse scroll wheel and/or
two-finger scrolling.Download Plotly figures at their currently rendered size.Ensure that dragging Plotly figures results in panning (rather than
zooming).Configure the output formatting of dataframes:Display dataframes as interactive HTML tables (usingitables).Increase the table size limit to 8 MiB.Adjust default colours for better contrast.Display cell contents in a monospace font.Extend the range of available table lengths.Make Polars dataframes output Markdown when printed.Show all dataframe columns, even if there are many of them.Try to make results reproducible by setting the seed for the built-inrandommodule, NumPy, and, if available, PyTorch and Tensorflow.
Package: jupyter-jaeger
jupyter-jaegerThis adds support for using theJaegerdistributed tracing tool with Jupyter. It facilitates the use case of tracking some process
that starts in a kernel and is continued in a mime renderer.We are using it to profile and debugibis-vega-transformwhich goes back and forth between the kernel and the frontend to interactively render charts with Altair.Installing this adds two Jupyter server extensions that start up thejaeger-all-in-oneandjaeger-browserprocesses when you launch Jupyter.
So to use it you must first instrument code in your kernel and/or in the frontend to record traces.It also provis a NPM Typescript plugin you can use to access the client from inside a JupyterLab extension.RequirementsJupyterLab >= 3.0Usage# Install jaeger-all-in-one binarycondainstall-cconda-forgejaeger# Install this packagepipinstalljupyter-jaeger# Optional, to see Jaeger icon in JupyterLab launcherrjupyterlabextensioninstalljupyterlab-server-proxy-saulshanabrook# Launch a Jupyter serverjupyterlab# Open the jaeger UIopenhttp://localhost:8080/jaegerInstallpipinstalljupyter-jaegerContributingDevelopment installNote: You will need NodeJS to build the extension package.Thejlpmcommand is JupyterLab's pinned version ofyarnthat is installed with JupyterLab. You may useyarnornpmin lieu ofjlpmbelow.# Clone the repo to your local environment# Change directory to the jupyter-jaeger directory# Install package in development modepipinstall-e.# Link your development version of the extension with JupyterLabjupyterlabextensiondevelop.--overwrite# Rebuild extension Typescript source after making changesjlpmrunbuildYou can watch the source directory and run JupyterLab at the same time in different terminals to watch for changes in the extension's source and automatically rebuild the extension.# Watch the source directory in one terminal, automatically rebuilding when neededjlpmrunwatch# Run JupyterLab in another terminaljupyterlabWith the watch command running, every saved change will immediately be built locally and available in your running JupyterLab. Refresh JupyterLab to load the change in your browser (you may need to wait several seconds for the extension to be rebuilt).By default, thejlpm run buildcommand generates the source maps for this extension to make it easier to debug using the browser dev tools. To also generate source maps for the JupyterLab core extensions, you can run the following command:jupyterlabbuild--minimize=FalseUninstallpipuninstalljupyter-jaegerExampleThis repo also includes an example of starting a trace from a kernel and continuing it in a mimeredenr jupyterlab extension,
in./example. You can try this example by:Launching the Binderfor this repo.Create a launcher and launch the Jaeger UIRun the notebook.Inspect the trace created by the notebook execution.