Package Pyblio :: Module Attribute
[hide private]
[frames] | no frames]

Module Attribute

source code

Basic data types that can be used as attributes for a Record.

Basic attributes of a record can be qualified by one or more additional sub-attributes. For instance, an attribute author of type Person can have, for every Person instance, a sub-attribute of type Date that represents its birth date.

Classes [hide private]
  _Qualified
Mix-in class that provides qualifiers to attributes, making them behave like composite data types (but not arbitrarily nested data, though)
  UnknownContent
An invalid type.
  Person
A person name.
  Date
A date.
  Text
Textual data
  URL
An URL
  ID
An external identifier
  Txo
Element of a taxonomy.
Variables [hide private]
  re_split = re.compile(r'(?u)\W+')
  N_to_C = {'date': <class 'Pyblio.Attribute.Date'>, 'id': <clas...
  C_to_N = {<class 'Pyblio.Attribute.Person'>: 'person', <class ...
Variables Details [hide private]

N_to_C

Value:
{'date': <class 'Pyblio.Attribute.Date'>,
 'id': <class 'Pyblio.Attribute.ID'>,
 'person': <class 'Pyblio.Attribute.Person'>,
 'text': <class 'Pyblio.Attribute.Text'>,
 'txo': <class 'Pyblio.Attribute.Txo'>,
 'url': <class 'Pyblio.Attribute.URL'>}

C_to_N

Value:
{<class 'Pyblio.Attribute.Person'>: 'person',
 <class 'Pyblio.Attribute.Date'>: 'date',
 <class 'Pyblio.Attribute.Text'>: 'text',
 <class 'Pyblio.Attribute.URL'>: 'url',
 <class 'Pyblio.Attribute.ID'>: 'id',
 <class 'Pyblio.Attribute.Txo'>: 'txo'}