Skip to content

Client

Client class for callers of the Rucio system

Classes

Client

Client(**args)
Main client class for accessing Rucio resources. Handles the authentication.

Note:
    Used to access all client methods. Each entity client *can* be used to access methods, but using the main client class is recommended for ease of use.

For using general methods -

from rucio.client import Client

client = Client()  # authenticate with config or environ settings
client.add_replication_rule(...)

client = Client(
    rucio_host = "my_host",
    auth_host = "my_auth_host",
    account = "jdoe12345",
    auth_type = "userpass",
    creds = {
        "username": "jdoe12345",
        "password": "******",
    }
) # authenticate with kwargs
client.list_replicas(...)

For using the upload and download clients -

from rucio.client import Client
from rucio.client.uploadclient import UploadClient
from rucio.client.downloadclient import DownloadClient

client = Client(...) # Initialize a client using your preferred method

upload_client = UploadClient(client) # Pass forward the initialized client
upload_client.upload(items=...)

download_client = DownloadClient(client)
download_client.download_dids(items=...)

Constructor for the Rucio main client class.

PARAMETER DESCRIPTION
rucio_host

the host of the rucio system.

auth_host

the host of the rucio authentication server.

account

the rucio account that should be used to interact with the rucio system.

ca_cert

the certificate to verify the server.

auth_type

the type of authentication to use (e.g. userpass, x509 ...)

creds

credentials needed for authentication.

timeout

Float describes the timeout of the request (in seconds).

vo

The vo that the client will interact with.

logger

Logger instance to use (optional)

Functions