genome_spy.Generator

class genome_spy.Generator(description=Undefined, name=Undefined, sequence=Undefined, **kwds)View on GitHub

Bases: GenomeSpySchema

Generated wrapper for Generator.

Methods

copy(*[, deep])

Return a copy with optional keyword updates.

description(value)

Return a copy with description updated.

name(value)

Return a copy with name updated.

resolve_references()

Return this class schema with referenced properties merged in.

sequence([value, as_, start, step, stop])

Return a copy with a SequenceParams sequence.

to_dict(*[, validate])

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*[, validate])

Serialize this schema wrapper to formatted JSON.

validate(instance)

Validate an instance against this wrapper's schema.

description(value)View on GitHub

Return a copy with description updated.

name(value)View on GitHub

Return a copy with name updated.

sequence(value=Undefined, /, *, as_=Undefined, start=Undefined, step=Undefined, stop=Undefined)View on GitHub

Return a copy with a SequenceParams sequence.

Parameters:
  • as_ (FieldName_T | ExprRef | dict[str, Any]) – The name of the generated sequence field. __Default value:__ "data"

  • start (float | ExprRef | dict[str, Any]) – The starting value of the sequence (inclusive).

  • step (float | ExprRef | dict[str, Any]) – The step value between sequence entries. __Default value:__ 1

  • stop (float | ExprRef | dict[str, Any]) – The ending value of the sequence (exclusive).

copy(*, deep=True, **kwds)View on GitHub

Return a copy with optional keyword updates.

classmethod resolve_references()View on GitHub

Return this class schema with referenced properties merged in.

to_dict(*, validate=True)View on GitHub

Serialize this schema wrapper to a JSON-compatible dictionary.

to_json(*, validate=True)View on GitHub

Serialize this schema wrapper to formatted JSON.

classmethod validate(instance)View on GitHub

Validate an instance against this wrapper’s schema.