altimeter.qj.schemas package

Submodules

altimeter.qj.schemas.job module

Job schemas

class Category(value)

Bases: str, enum.Enum

Job Category

gov: str = 'gov'
sec: str = 'sec'
class Job(**data)

Bases: altimeter.qj.schemas.job.JobBase

Job schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
orm_mode = True
active: bool
created: datetime.datetime
max_graph_age_sec: int
max_result_age_sec: int
query_fields: List[str]
result_expiration_sec: int
class JobBase(**data)

Bases: pydantic.main.BaseModel

JobBase schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
category: altimeter.qj.schemas.job.Category
description: str
graph_spec: altimeter.qj.schemas.job.JobGraphSpec
name: str
classmethod name_is_valid(value)

Validate the name of a job. Must begin with a letter and may consist of one or more alphanumerics or underscores.

Return type

str

query: str
severity: altimeter.qj.schemas.job.Severity
class JobCreate(**data)

Bases: altimeter.qj.schemas.job.JobBase

JobCreate schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
max_graph_age_sec: Optional[int]
max_result_age_sec: Optional[int]
result_expiration_sec: Optional[int]
class JobGraphSpec(**data)

Bases: pydantic.main.BaseModel

JobGraphSpec schema

graph_names: List[str]
class JobUpdate(**data)

Bases: pydantic.main.BaseModel

JobUpdate schema. Contains fields that can be updated. Some fields like query can not be updated as they will fundamentally change the result schema view

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
active: Optional[bool]
category: Optional[altimeter.qj.schemas.job.Category]
description: Optional[str]
classmethod from_job_create(job_create)

Build a JobUpdate object from the relevant fields of a JobCreate object

Return type

JobUpdate

max_graph_age_sec: Optional[int]
max_result_age_sec: Optional[int]
result_expiration_sec: Optional[int]
severity: Optional[altimeter.qj.schemas.job.Severity]
class Severity(value)

Bases: str, enum.Enum

Job Severity

debug: str = 'debug'
error: str = 'error'
info: str = 'info'
warn: str = 'warn'

altimeter.qj.schemas.result_set module

ResultSet and Result schemas

class Result(**data)

Bases: pydantic.main.BaseModel

ResultBase schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
orm_mode = True
account_id: str
classmethod account_id_is_int(value)

Validate that an account id is an integer

Return type

str

result: Dict[str, Any]
classmethod zero_pad_account_id(value)

Zero pad aws account ids

Return type

str

class ResultSet(**data)

Bases: altimeter.qj.schemas.result_set.ResultSetBase

ResultSet schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
orm_mode = True
created: datetime.datetime
graph_spec: altimeter.qj.schemas.result_set.ResultSetGraphSpec
job: altimeter.qj.schemas.job.Job
results: List[altimeter.qj.schemas.result_set.Result]
class ResultSetBase(**data)

Bases: pydantic.main.BaseModel

ResultSetBase schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
created: datetime.datetime
graph_spec: altimeter.qj.schemas.result_set.ResultSetGraphSpec
job: altimeter.qj.schemas.job.Job
results: List[altimeter.qj.schemas.result_set.Result]
class ResultSetCreate(**data)

Bases: altimeter.qj.schemas.result_set.ResultSetBase

ResultSetCreate schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
created: datetime.datetime
graph_spec: altimeter.qj.schemas.result_set.ResultSetGraphSpec
job: altimeter.qj.schemas.job.Job
results: List[altimeter.qj.schemas.result_set.Result]
class ResultSetGraphSpec(**data)

Bases: pydantic.main.BaseModel

ResultSetGraphSpec schema

graph_uris_load_times: Dict[str, int]
class ResultSetsPruneResult(**data)

Bases: pydantic.main.BaseModel

ResultSetsPruneResult schema

class Config

Bases: object

Pydantic config overrides

extra = 'forbid'
num_pruned: int

altimeter.qj.schemas.status module

Pydantic Status schemas

class Status(**data)

Bases: pydantic.main.BaseModel

Status schema

status: str

Module contents

All Pydantic ‘schema’ classes should be imported here