panda-client

The panda-client package includes python modules and command-line tools to allow end-users to submit/manage their analysis on the PanDA system. This package is supposed to be used by end-users as functionality is simplified and limited. System administrators or developers should refer to API reference.

Installation

panda-client works with Python 3. The installation step can be skipped if panda-client has been centrally installed like ATLAS. Otherwise, simply run the following pip command in a virtual environment to install all python modules, command-line tools and configuration files:

pip install panda-client

If you install panda-client in JupyterLab,

pip install panda-client[jupyter]

will install extra packages in addition to panda-client.

Note

panda-client only publishes a source distribution (sdist) to PyPI, not a wheel. Modern installers (pip, uv, etc.) build a wheel from that sdist locally, by default inside an isolated, temporary virtual environment. Since the panda_setup.(c)sh setup files are generated at wheel-build time based on the environment the wheel is built in, an isolated build environment can produce setup files pointing at a path that no longer exists once the wheel is actually installed.

To avoid this, disable build isolation so the wheel is built directly in your target environment:

pip install --no-build-isolation panda-client

or, with uv:

uv pip install --no-build-isolation-package panda-client

or, with Pixi add the following to your pixi.toml

[pypi-options]
no-build-isolation = ["panda-client"]

and then:

pixi add hatchling
pixi add --pypi panda-client

If you’re installing into an environment that isn’t currently active (e.g. scripting an install), propagate its location to the build step explicitly:

env PANDA_INSTALL_TARGET=<path to environment> uv pip install panda-client

If you want to install panda-client to a non-standard location, get the tarball from https://github.com/PanDAWMS/panda-client/releases

wget https://github.com/PanDAWMS/panda-client/archive/refs/tags/x.y.z.tar.gz
tar xvfz *.tar.gz
rm *.tar.gz
cd panda-client*
export PANDA_INSTALL_TARGET=<where to be installed>
pip install . --prefix ${PANDA_INSTALL_TARGET}

Setup

When panda-client is installed to a standard location via pip, the setup file panda_setup.(c)sh is automatically generated under the directory shown by the following command:

python -c "import sys; print(sys.prefix+'/etc/panda')"

You need to source the file to setup the required environment variables before using the python modules and command-line tools. It is good to define a shell function to source the setup file as shown in the ATLAS users tag.

source `python -c "import sys; print(sys.prefix)"`/etc/panda/panda_setup.sh

Replace `python …` properly if you install panda-client to a non-standard location.

The following environment variables need to change if necessary.

Name

Description

Example

PANDA_URL_SSL

Base HTTPS URL of PanDA server

https://pandaserver-doma.cern.ch/server/panda

PANDA_URL

Base HTTP URL of PanDA server

https://pandaserver-doma.cern.ch/server/panda

PANDAMON_URL

URL of PanDA monitor

https://panda-doma.cern.ch

PANDACACHE_URL

Base URL of PanDA sandbox server

https://pandaserver-doma.cern.ch/server/panda

PANDA_AUTH

Authentication mechanism. oidc to enable OIDC/OAuth2.0.
x509_no_grid to use X509 without grid niddleware.
x509 by default.

oidc

PANDA_AUTH_VO

Virtual organization name (required only when PANDA_AUTH=oidc)

wlcg

PANDA_VERIFY_HOST

Set off to disable the host verification

off

PANDA_USE_NATIVE_HTTPLIB

Set 1 to use native http lib instead of curl

1

X509_USER_PROXY

Grid proxy file path (required only when PANDA_AUTH = x509_no_grid)

/tmp/x509up_u`id -u`

PANDA_NICKNAME

Grid nickname (required only when PANDA_AUTH = x509_no_grid)

my_nickname

PANDA_PRODUCTION_ROLE

Production role name. “production” by default

prod

PANDA_NICKNAME_REPLACE

Replace substring in the nickname using the given regular expression pattern.
The pattern is <separator>source<separator>destination<separator> where
<separator> is a character that does not appear in the source or destination
strings. The example shows how to remove @blah from the nickname.

/@.+$//

export PANDA_URL_SSL=https://pandaserver-doma.cern.ch/server/panda
export PANDA_URL=https://pandaserver-doma.cern.ch/server/panda
export PANDACACHE_URL=https://pandaserver-doma.cern.ch/server/panda
export PANDAMON_URL=https://panda-doma.cern.ch
export PANDA_AUTH=oidc
export PANDA_AUTH_VO=<your organization>
export PANDA_USE_NATIVE_HTTPLIB=1