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

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.51
File Size Uploaded
swanspawner-1.2.51.tar.gz 22.1 kB Details

Built distribution (wheel)

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

Total release size: 46.1 kB

Release files / swanspawner-1.2.51.tar.gz

Download URL swanspawner-1.2.51.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3421a0f83f22e0129bc4f2ac4a1619b398a27fc2e53820b5861e350dc40aefc3
BLAKE2b-256 checksum
How to use checksums
6e5c7c7cccaf20271b4b87fd4f1b3aa8056b28e87d3549930ed6625e08cd0490
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 16, 2026.

Transparency log

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

Download URL swanspawner-1.2.51-py3-none-any.whl
Size 24.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c145842058b9430a62b149407e28eaca2e77477489b3d646189553f0397dcb63
BLAKE2b-256 checksum
How to use checksums
8e7bbf156e869d93d377ac553822d2728ed71368f75931caba1d72e23050b42b
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 16, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.52

2 release files

This release

1.2.51 This release

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