Views

class typerighter.views.Field(name)[source]

A descriptor used to join a mutable View instance, that stores data, with the immutable Type instance, that only defines methods for operating on data.

class typerighter.views.View(record, data=None)[source]

A View combines a Record with a dictionary to provide an object modeled after the record that can store data in a familiar object oriented manner.

typerighter.views.make_view(record, data=None)[source]

Takes both a record and some data and produces View instance.

Parameters
  • record (Type) – The type that defines the view’s shape

  • data (dict) – Any initial data for the view’s fields