Models

pydantic model servicex.models.CachedDataset[source]

Bases: BaseModel

Model for a cached dataset held by ServiceX server

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field id: int [Required]
field name: str [Required]
field did_finder: str [Required]
field n_files: int [Required]
field size: int [Required]
field events: int [Required]
field last_used: datetime [Required]
field last_updated: datetime [Required]
field lookup_status: str [Required]
field is_stale: bool [Required]
field files: List[DatasetFile] | None = []
pydantic model servicex.models.DatasetFile[source]

Bases: BaseModel

Model for a file in a cached dataset

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field id: int [Required]
field adler32: str | None [Required]
field file_size: int [Required]
field file_events: int [Required]
field paths: str [Required]
pydantic model servicex.models.DocStringBaseModel[source]

Bases: BaseModel

Class to autogenerate a docstring for a Pydantic model

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

class servicex.models.ResultDestination(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Direct the output to object store or posix volume

object_store = 'object-store'
volume = 'volume'
pydantic model servicex.models.ResultFile[source]

Bases: DocStringBaseModel

Record reporting the properties of a transformed file result

Parameters:
  • filename – (str)

  • size – (int)

  • extension – (str)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field filename: str [Required]
field size: int [Required]
field extension: str [Required]
class servicex.models.ResultFormat(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Specify the file format for the generated output

parquet = 'parquet'
root_ttree = 'root-file'
class servicex.models.Status(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: str, Enum

Status of a submitted transform

canceled = 'Canceled'
complete = 'Complete'
fatal = 'Fatal'
looking = 'Lookup'
pending = 'Pending Lookup'
running = 'Running'
submitted = 'Submitted'
pydantic model servicex.models.TransformRequest[source]

Bases: DocStringBaseModel

Transform request sent to ServiceX

Parameters:
  • title – (typing.Optional[str])

  • did – (typing.Optional[str])

  • file_list – (typing.Optional[typing.List[str]])

  • selection – (str)

  • image – (typing.Optional[str])

  • codegen – (str)

  • tree_name – (typing.Optional[str])

  • result_destination – (ResultDestination)

  • result_format – (ResultFormat)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field title: str | None = None
field did: str | None = None
field file_list: List[str] | None = None (alias 'file-list')
field selection: str [Required]
field image: str | None = None
field codegen: str [Required]
field tree_name: str | None = None (alias 'tree-name')
field result_destination: ResultDestination [Required]
field result_format: ResultFormat [Required]
compute_hash()[source]

Compute a hash for this submission. Only include properties that impact the result so we have maximal ability to reuse transforms

Returns:

SHA256 hash of request

pydantic model servicex.models.TransformStatus[source]

Bases: DocStringBaseModel

Status object returned by servicex

Parameters:
  • request_id – (str)

  • did – (str)

  • title – (typing.Optional[str])

  • selection – (str)

  • tree_name – (typing.Optional[str])

  • image – (str)

  • result_destination – (ResultDestination)

  • result_format – (ResultFormat)

  • generated_code_cm – (str)

  • status – (Status)

  • app_version – (str)

  • files – (int)

  • files_completed – (int)

  • files_failed – (int)

  • files_remaining – (typing.Optional[int])

  • submit_time – (datetime)

  • finish_time – (typing.Optional[datetime.datetime])

  • minio_endpoint – (typing.Optional[str])

  • minio_secured – (typing.Optional[bool])

  • minio_access_key – (typing.Optional[str])

  • minio_secret_key – (typing.Optional[str])

  • log_url – (typing.Optional[str])

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Validators:
field request_id: str [Required]
field did: str [Required]
field title: str | None = None
field selection: str [Required]
field tree_name: str | None [Required]
field image: str [Required]
field result_destination: ResultDestination [Required]
field result_format: ResultFormat [Required]
field generated_code_cm: str [Required]
field status: Status [Required]
field app_version: str [Required]
field files: int [Required]
field files_completed: int [Required]
field files_failed: int [Required]
field files_remaining: int | None = 0
field submit_time: datetime = None
field finish_time: datetime | None = None
field minio_endpoint: str | None = None
field minio_secured: bool | None = None
field minio_access_key: str | None = None
field minio_secret_key: str | None = None
field log_url: str | None = None
pydantic model servicex.models.TransformedResults[source]

Bases: DocStringBaseModel

Returned for a submission. Gives you everything you need to know about a completed

transform.

Parameters:
  • hash – (str) Unique hash for transformation (used to look up results in cache)

  • title – (str) Title of transformation request

  • codegen – (str) Code generator used (internal ServiceX information related to query type)

  • request_id – (str) Associated request ID from the ServiceX server

  • submit_time – (datetime) Time of submission

  • data_dir – (str) Local directory for output

  • file_list – (typing.List[str]) List of downloaded files on local disk

  • signed_url_list – (typing.List[str]) List of URLs to retrieve output from remote ServiceX object store

  • files – (int) Number of files in result

  • result_format – (ResultFormat) File format for results

  • log_url – (typing.Optional[str]) URL for looking up logs on the ServiceX server

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

field hash: str [Required]

Unique hash for transformation (used to look up results in cache)

field title: str [Required]

Title of transformation request

field codegen: str [Required]

Code generator used (internal ServiceX information related to query type)

field request_id: str [Required]

Associated request ID from the ServiceX server

field submit_time: datetime [Required]

Time of submission

field data_dir: str [Required]

Local directory for output

field file_list: List[str] [Required]

List of downloaded files on local disk

field signed_url_list: List[str] [Required]

List of URLs to retrieve output from remote ServiceX object store

field files: int [Required]

Number of files in result

field result_format: ResultFormat [Required]

File format for results

field log_url: str | None = None

URL for looking up logs on the ServiceX server