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.53

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.53
File Size Uploaded
swanspawner-1.2.53.tar.gz 28.5 kB Details

Built distribution (wheel)

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

Total release size: 62.2 kB

Release files / swanspawner-1.2.53.tar.gz

Download URL swanspawner-1.2.53.tar.gz
Size 28.5 kB
Tags Source
SHA-256 checksum
How to use checksums
fcf51599c10c7242b560cb2e1b3bfd46a50318d945e7723ef2b91790055c0f87
BLAKE2b-256 checksum
How to use checksums
b07cffe3eff6ceb31a813e9265f8d735e1f6db130111b81774e57854994f2973
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 Oct 2, 2026.

Transparency log

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

Download URL swanspawner-1.2.53-py3-none-any.whl
Size 33.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1aaac40fb6965c4a287fc169e7f6cdeeb9db4f37fe18ea3ece07319aaf44917a
BLAKE2b-256 checksum
How to use checksums
140cfc38477b528a3163b1be2594941c99f63ce6e05f4ae3f59e8bd55fc3424c
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 Oct 2, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.53 This release

2 release files

1.2.52

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