Skip to main content

SWAN Spawner

Spawner for JupyterHub that enables configuring a session with CVMFS/LCG stacks, support for GPU, oAuth tokens, etc. If Binder is used to configure the container image used, it reverts to the default upstream configuration. Requires Kubernetes.

Installation

pip3 install swanspawner

Usage

Add to your JupyterHub config file

c.JupyterHub.spawner_class = 'swanspawner.swankubespawner.SwanKubeSpawner'

If you deploy with Kubernetes.

Jupyter Notebook environment variables set during spawn

env
ROOT_LCG_VIEW_NAME
ROOT_LCG_VIEW_PLATFORM
USER_ENV_SCRIPT
ROOT_LCG_VIEW_PATH
USER
USER_ID
USER_GID
HOME
EOS_PATH_FORMAT
SERVER_HOSTNAME
MAX_MEMORY
JPY_USER
JPY_COOKIE_NAME
JPY_BASE_URL
JPY_HUB_PREFIX
JPY_HUB_API_URL
ACCESS_TOKEN
OAUTH_INSPECTION_ENDPOINT

Spawn Form configuration

To configure custom form, please set path to config file as below

c.SwanSpawner.options_form_config = '<path>'

High level objects

optionsform:
  header: <options header text>
  enable_customenv_form: <boolean>
  enable_generate_url_form: <boolean>
  enable_network_form: <boolean>
  with_rucio: <array of rucio options objects>
  lcg_options: <array of lcg options objects>
  customenv_options: <array of customenvs options objects>

Options type label

  lcg_options:
  - type: "label"
    label: 
      value: <id of label>,
      text: <displayed text of label>
  # ...

Options type selection

  lcg_options:
  - type: "selection"
    lcg:
      value: <id of lcg>
      text: <displayed text of lcg>
    platforms:
      - value: <id of platform>
        text: <displayed text of platform>
      # ...
    cores:
      - value: <id of cores selection>
        text: <displayed text of cores selection>
      # ...
    memory:
      - value: <id of memory selection>
        text: <displayed text of memory selection>
      # ...
    clusters:
      - value: <id of cluster>
        text: <displayed text of cluster>
      # ...
  # ...
  customenv_options:
  - type: "selection"
    builder:
      value: <id of builder>
      text: <displayed text of builder>
    cores:
      - value: <id of cores selection>
        text: <displayed text of cores selection>
      # ...
    memory:
      - value: <id of memory selection>
        text: <displayed text of memory selection>
      # ...
    clusters:
      - value: <id of cluster>
        text: <displayed text of cluster>
      # ...
  # ...

An example yaml file can be seen in options_form_config.yaml

Metadata

Release files for swanspawner 1.2.52

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for swanspawner 1.2.52
File Size Uploaded
swanspawner-1.2.52.tar.gz 28.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for swanspawner 1.2.52
File Interpreter ABI Platform
swanspawner-1.2.52-py3-none-any.whl Python 3 none any Details

Total release size: 62.1 kB

Release files / swanspawner-1.2.52.tar.gz

Download URL swanspawner-1.2.52.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
92417773cc230a88770004de1a1af380d2f55158c434e008326749474cc36b0e
BLAKE2b-256 checksum
How to use checksums
c04cca05697d391b6d4895742ca8dff12b2d80f4df7d680c815708c070402ee7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Sep 23, 2026.

Transparency log

Release files / swanspawner-1.2.52-py3-none-any.whl

Download URL swanspawner-1.2.52-py3-none-any.whl
Size 33.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7f1e53782502170d7a2c656ad06c4eaa75d3d621d9bb18a7443e3bc3a62c7fec
BLAKE2b-256 checksum
How to use checksums
305298c4935846aa33bd591f45acacc6f4e45aeb53ac3a9f66757752e5e46e36
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 Sep 23, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.52 This release

2 release files

1.2.51

2 release files

1.2.48

2 release files

1.2.47

2 release files

1.2.46

2 release files

1.2.43

2 release files

1.2.42

2 release files

1.2.41

2 release files

1.2.37

2 release files

1.2.36

2 release files

1.2.35

2 release files

1.2.34

2 release files

1.2.33

2 release files

1.2.30

2 release files

1.2.29

2 release files

1.2.28

2 release files

1.2.27

2 release files

1.2.26

2 release files

1.2.25

2 release files

1.2.23

2 release files

1.2.20

2 release files

1.2.19

2 release files

1.2.18

2 release files

1.2.17

2 release files

1.2.15

2 release files

1.2.14

2 release files

1.2.13

2 release files

1.2.12

2 release files

1.2.11

2 release files

1.2.10

2 release files

1.2.9

2 release files

1.2.8

2 release files

1.2.7

2 release files

1.2.6

2 release files

1.2.5

2 release files

1.2.4

2 release files

1.2.3

2 release files

1.2.2

2 release files

1.2.1

2 release files

1.2.0

2 release files

1.1.3

2 release files

1.1.2

2 release files

1.1.1

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.5.0

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.1

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page