Import into extraConfig

I’d like to import a short data file into the extraConfig section of config.yaml; this file contains secrets (tokens) that I obviously don’t want to github. In a standard Python distribution I’d put them into conf.py, and reference them with an import conf statement in the Python code.
My problem is that I don’t know the Python path for JupyterHub when it’s compiled into a container. Where should I put this file?
I’m using Z2JH on Kubernetes…

Thanks in advance…

The Python environment is currently /usr/local/lib/python3.11:

$ docker run quay.io/jupyterhub/k8s-hub:3.2.1 python -c 'import sys; print(sys.path)'
['', '/usr/local/lib/python311.zip', '/usr/local/lib/python3.11', '/usr/local/lib/python3.11/lib-dynload', '/usr/local/lib/python3.11/site-packages']

An alternative is to store the tokens as native Kubernetes secrets, and pass them as secret environment variables:

Many thanks, @manics that really cleared it up!

1 Like