braket.schema_common.schema_base module

class braket.schema_common.schema_base.BraketSchemaBase[source]

Bases: pydantic.main.BaseModel

BraketSchemaBase which includes the schema header and should be the parent class for all schemas


Schema header


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

Raises ValidationError if the input data cannot be parsed to form a valid model.

static import_schema_module(schema: braket.schema_common.schema_base.BraketSchemaBase)[source]

Imports the module that holds the schema given the schema


schema (BraketSchemaBase) – The schema


Module of the schema

  • ModuleNotFoundError – If the schema module cannot be found according to
  • schema header


>> schema = BraketSchemaBase.parse_raw(json_string) >> module = import_schema_module(schema) >> module.AnnealingTaskResult.parse_raw(json_string)

static parse_raw_schema(json_str: str) → braket.schema_common.schema_base.BraketSchemaBase[source]

Return schema object given JSON string

Parameters:json_str (str) – The JSON string of the schema
Returns:BraketSchemaBase – The schema object. This can also be an instance of a subclass of BraketSchemaBase.
static get_schema_class(module, name)[source]