openpyxl.descriptors.base module

Based on Python Cookbook 3rd Edition, 8.13 http://chimera.labs.oreilly.com/books/1230000000393/ch08.html#_discussiuncion_130

class openpyxl.descriptors.base.ASCII(*args, **kw)[source]

Bases: Typed

expected_type

alias of bytes

class openpyxl.descriptors.base.Alias(alias)[source]

Bases: Descriptor

Aliases can be used when either the desired attribute name is not allowed or confusing in Python (eg. “type”) or a more descriptive name is desired (eg. “underline” for “u”)

class openpyxl.descriptors.base.Bool(*args, **kw)[source]

Bases: Convertible

expected_type

alias of bool

class openpyxl.descriptors.base.Convertible(*args, **kw)[source]

Bases: Typed

Values must be convertible to a particular type

class openpyxl.descriptors.base.DateTime(*args, **kw)[source]

Bases: Typed

expected_type

alias of datetime

class openpyxl.descriptors.base.Default(name=None, **kw)[source]

Bases: Typed

When called returns an instance of the expected type. Additional default values can be passed in to the descriptor

class openpyxl.descriptors.base.Descriptor(name=None, **kw)[source]

Bases: object

class openpyxl.descriptors.base.Float(*args, **kw)[source]

Bases: Convertible

expected_type

alias of float

class openpyxl.descriptors.base.Integer(*args, **kw)[source]

Bases: Convertible

expected_type

alias of int

class openpyxl.descriptors.base.Length(name=None, **kw)[source]

Bases: Descriptor

class openpyxl.descriptors.base.MatchPattern(name=None, **kw)[source]

Bases: Descriptor

Values must match a regex pattern

allow_none = False
class openpyxl.descriptors.base.Max(**kw)[source]

Bases: Convertible

Values must be less than a max value

allow_none = False
expected_type

alias of float

class openpyxl.descriptors.base.Min(**kw)[source]

Bases: Convertible

Values must be greater than a min value

allow_none = False
expected_type

alias of float

class openpyxl.descriptors.base.MinMax(**kw)[source]

Bases: Min, Max

Values must be greater than min value and less than a max one

class openpyxl.descriptors.base.NoneSet(name=None, **kw)[source]

Bases: Set

‘none’ will be treated as None

class openpyxl.descriptors.base.Set(name=None, **kw)[source]

Bases: Descriptor

Value can only be from a set of know values

class openpyxl.descriptors.base.String(*args, **kw)[source]

Bases: Typed

expected_type

alias of str

class openpyxl.descriptors.base.Text(*args, **kw)[source]

Bases: String, Convertible

class openpyxl.descriptors.base.Tuple(*args, **kw)[source]

Bases: Typed

expected_type

alias of tuple

class openpyxl.descriptors.base.Typed(*args, **kw)[source]

Bases: Descriptor

Values must of a particular type

allow_none = False
expected_type

alias of None

nested = False