Skip to main content
Release file added late

1 file was added to this release more than 14 days after its initial publication. Inspect the release files before installing.

Build Status

Run Registry Client

Python client to retrieve and query data from CMS Run Registry.

Installation

pip install runregistry

Authentication (Prerequisite)

You must provide a way for the client to access a Grid user certificate.

You can either do this in 3 possible ways:

  1. Provide the certificate manually (explained below).
  2. providing the user certificate in the conventional path (first ~\private\ and second ~\.globus\).
  3. Setting your own path where you store the certificate in an environment variable: CERN_CERTIFICATE_PATH

Provide the certificate manually

  1. Download a grid user certificate from here.
  2. Convert it into public and private key (The certificates have to be passwordless. ):
mkdir -p ~/private
openssl pkcs12 -clcerts -nokeys -in myCertificate.p12 -out ~/private/usercert.pem
openssl pkcs12 -nocerts -in myCertificate.p12 -out ~/private/userkey.tmp.pem
openssl rsa -in ~/private/userkey.tmp.pem -out ~/private/userkey.pem

Usage

Get a single run (get_run):

import runregistry
runregistry.get_run(run_number=328762)

Query several runs (get_runs):

import runregistry
runregistry.get_runs(run_number={
    'or': [328762, 323555, 323444]
})

Apply a custom filter (run_numbers between 309000 and 310000 which had at least one GOOD dt lumisection):

import runregistry
runregistry.get_runs(
    filter={
        'run_number': {
            'and':[
                '>': 309000,
                '<': 310000
            ]
        },
        'dt': 'GOOD'
    }
)

Depending on the attribute you can use different operators:

Attribute Supported operators
Integer/float '=', '>', '<', '>=', '<=', '<>'
String =, like, notlike
Boolean = (true, false)

When using 'like' or 'notlike' operator, you must surround your query with percentage signs, see example below.

When filtering for triplet attributes (anything that is GOOD/BAD/STANDBY...) you must not use any String values, the only value allowed is strict equality '=' and is set by default.

You can combine the filters as well:

import runregistry
runregistry.get_runs(
    filter={
        'run_number': {
            'and':[
                '>': 309000,
                '<': 310000
            ]
        },
        'hlt_key': {
            'like': '%commissioning2018%'
        }
        'significant': {
            '=': True
        }
    }
)

If by observing the Network Requests in RR web application, you want to use the same filters observed by the network request. Just passs ignore_filter_transformation=True to any query.

Example (run_numbers between 309000 and 310000 which had at least one GOOD dt lumisection):

import runregistry
runregistry.get_runs(
    filter={
        'run_number': {
            '>': 309000, '<': 310000
        },
        'oms_attributes.hlt_key': {
            'like': '%commissioning2018%'
        },
        'triplet_summary.dt_triplet.GOOD': {
            '>': 0
        }
    },
    ignore_filter_transformation=True
)

Also, if by observing the Network Requests in RR web application, you want to obtain the data as it is seen in the network requests. Just compress_attributes=False, for example:

import runregistry
runregistry.get_runs(
    filter={
        'run_number': {
            'and':[
                '>': 309000,
                '<': 310000
            ]
        },
        'dt': 'GOOD'
    },
    compress_attributes=False
)

querying by comments and cause is not yet possible

Metadata

Release files for runregistry 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

File added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release files before installing.

Source distribution (sdist)

Source distribution for runregistry 0.1.3
File Size Uploaded Provenance Actions
runregistry-0.1.3.tar.gz 9.0 kB File added late: Without provenance Details for runregistry-0.1.3.tar.gz

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / runregistry-0.1.3.tar.gz

File added late

This file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.

We recommend inspecting the release file before installing.

Download URL runregistry-0.1.3.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
b290582e30f4c84b25ebbcaeab577c9a6bfae649e5b8b4e8ae5302b5b6ebfb53
BLAKE2b-256 checksum
How to use checksums
674a139ceec63af49d580094c29f6951d3653ad795c6a5291a5d834ae8bb1990
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4

Release files / runregistry-0.1.3-py3-none-any.whl

Download URL runregistry-0.1.3-py3-none-any.whl
Size 11.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
aaaed4baf7cfd289a885f6995d63e25cf99ba168126e400e3f577d07fe86807a
BLAKE2b-256 checksum
How to use checksums
c43ed05aca175dcabba99058e370601d7cd7036622475d37b12fd4aee736dd80
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.6.4

Security for runregistry 0.1.3

Upload timing

Release file added late

1 file was uploaded more than 14 days after the first file in this release.

While project maintainers occasionally add legitimate files to an existing release, late additions can also indicate a security compromise.


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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

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