Skip to main content

Submit Functional Queries to a ServiceX endpoint.

Project description

func_adl_servicex

Send func_adl expressions to a ServiceX endpoint

GitHub Actions Status Code Coverage

PyPI version Supported Python versions

Introduction

This package contains the single object ServiceXDataset which can be used as a root of a func_adl expression to query large LHC datasets from an active ServiceX instance located on the net.

For example, get get all the jet pt's above 30 GeV from an ATLAS xaod:

example

And to fetch the same from a root tuple file:

example

Further Information

  • servicex documentation
  • func_adl documentation

Usage

To use func_adl on servicex, the only func_adl package you only need to install this package. All others required will be pulled in as dependencies of this package.

Using the xAOD backend

See the further information for documentation above to understand how this works. Here is a quick sample that will run against an ATLAS xAOD backend in servicex to get out jet pt's

<get this done>

Using the uproot backend

See the further information for documentation above to understand how this works. Here is a quick sample that will run against a ROOT file (TTree) in the uproot backend in servicex to get out jet pt's. Note that the image name tag is likely wrong here. See XXX to get the current one.

from servicex import ServiceXDataset
from func_adl_servicex import ServiceXDatasetSource


dataset_uproot = "user.kchoi:user.kchoi.ttHML_80fb_ttbar"
uproot_transformer_image = "sslhep/servicex_func_adl_uproot_transformer:issue6"

sx_dataset = ServiceXDataset(dataset_uproot, image=uproot_transformer_image)
ds = ServiceXDatasetSource(sx_dataset, "nominal")
data = ds.Select("lambda e: {'lep_pt_1': e.lep_Pt_1, 'lep_pt_2': e.lep_Pt_2}") \
    .AsParquetFiles('junk.parquet') \
    .value()

print(data)

Development

PR's are welcome! Feel free to add an issue for new features or questions.

The master branch is the most recent commits that both pass all tests and are slated for the next release. Releases are tagged. Modifications to any released versions are made off those tags.

Qastle

This is for people working with the back-ends that run in servicex.

This is the qastle produced for an xAOD dataset:

(call EventDataset 'ServiceXDatasetSource')

(the actual dataset name is passed in the servicex web API call.)

This is the qastle produced for a ROOT flat file:

(call EventDataset 'ServiceXDatasetSource' 'tree_name')

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

func_adl_servicex-1.0a4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

func_adl_servicex-1.0a4-py3-none-any.whl (4.6 kB view details)

Uploaded Python 3

File details

Details for the file func_adl_servicex-1.0a4.tar.gz.

File metadata

  • Download URL: func_adl_servicex-1.0a4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for func_adl_servicex-1.0a4.tar.gz
Algorithm Hash digest
SHA256 8c56f5b7e83a09920b6fb4ffa830b9d02736128cb0960654c46926e53cded725
MD5 c1b199779b790abfbe76ce9158ab5cea
BLAKE2b-256 ab58ff05ceffc22da95d2a3bd9595b16fd65598390185beb628dddc06cf684db

See more details on using hashes here.

Provenance

File details

Details for the file func_adl_servicex-1.0a4-py3-none-any.whl.

File metadata

  • Download URL: func_adl_servicex-1.0a4-py3-none-any.whl
  • Upload date:
  • Size: 4.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5

File hashes

Hashes for func_adl_servicex-1.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 fd82abfc00173a4ecf52f1ee212f099ea4f0f15c8838275668edec83d1232d27
MD5 5f7b21980bed98875bb749d6624f169f
BLAKE2b-256 a03bdc40657afd91f0923a4be9f8f2bcdbc0e7ffc8ca3988fa941840209a008e

See more details on using hashes here.

Provenance

Supported by

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