Skip to main content

A package with analysis tools for ServiceX.

Project description

ServiceX analysis utils

This repository hosts tools that depend on the ServiceX Client. These tools facilitate ServiceX's general usage and offer specific features that replace parts of an analyser workflow.

To install

pip install servicex-analysis-utils

Requirements

This package depends requires a servicex.yml configuration file granting access to one endpoint with a deployed ServiceX backend.

This package contains:

to_awk():

Load an awkward array from the deliver() output with uproot or uproot.dask.

Parameters:
    deliver_dict (dict): Returned dictionary from servicex.deliver()
                        (keys are sample names, values are file paths or URLs).
    dask (bool):        Optional. Flag to load as dask-awkward array. Default is False
    iterator(bool):      Optional. Flag to materialize the data into arrays or to return iterables with uproot.iterate
    **kwargs :   Optional. Additional keyword arguments passed to uproot.dask, uproot.iterate and from_parquet


Returns:
    dict: keys are sample names and values are awkward arrays, uproot generator objects or dask-awkward arrays.

get-structure():

    Creates and sends the ServiceX request from user inputed datasets to retrieve file stucture.
    Calls print_structure_from_str() to dump the structure in a user-friendly format

    Parameters:
      datasets (dict,str,[str]): The datasets from which to print the file structures.
                                 A name can be given as the key of each dataset in a dictionary  
      kwargs : Arguments to be propagated to print_structure_from_str, e.g filter_branch

Function can be called from the command line, e.g:

$ servicex-get-structure "mc23_13TeV:some-dataset-rucio-id" --filter_branch "truth"

Documentation

The different functions are documented in readthedcos

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

servicex_analysis_utils-1.1.0.tar.gz (7.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servicex_analysis_utils-1.1.0-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

Details for the file servicex_analysis_utils-1.1.0.tar.gz.

File metadata

  • Download URL: servicex_analysis_utils-1.1.0.tar.gz
  • Upload date:
  • Size: 7.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for servicex_analysis_utils-1.1.0.tar.gz
Algorithm Hash digest
SHA256 b049167dad5c8c5766eff3ceaeff4eabaa1535b2bf87a7afb33aa1f07dcc63ce
MD5 546eea9c4b53887f2e7cf008179af83d
BLAKE2b-256 ad8169e6ef955edd4939dcc9c7d228b0b92e43f3ec0d61c8f3e1ce22d31f4d27

See more details on using hashes here.

Provenance

The following attestation bundles were made for servicex_analysis_utils-1.1.0.tar.gz:

Publisher: pypi.yml on ssl-hep/ServiceX_analysis_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file servicex_analysis_utils-1.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for servicex_analysis_utils-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9e5f28bbd5acd63f02b3a7f89406576b2181acecee6ff1334fe866738ff64878
MD5 d7c98175bd97e52a702c01234bcca3dc
BLAKE2b-256 d2d15ed0922a2080fc4473c0f16026e88a16324ba246e2d83e32f689ca053107

See more details on using hashes here.

Provenance

The following attestation bundles were made for servicex_analysis_utils-1.1.0-py3-none-any.whl:

Publisher: pypi.yml on ssl-hep/ServiceX_analysis_utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page