pyaltium.matlib.base#

base.py

Base matlib types not really meant for direct use outside of source.

Module Contents#

Classes#

MatProperty

Holds information about a Property, a subclass of Entity for materials library.

ColorProperty

More specific version of a MatProperty, specifically for colors

MatLibEntity

Base class to represent a single item. This Entity will contain multiple properties.

Attributes#

T

exception pyaltium.matlib.base.PropertyValidationError#

Bases: Exception

Raised when a property does not meet requirements.

class pyaltium.matlib.base.MatProperty#

Holds information about a Property, a subclass of Entity for materials library.

name :str#
type :str#
value :str#
attrib :dict[str, str]#
validator :Callable#
validator_message :str =#
atrset :str =#
setproc :Callable#
class pyaltium.matlib.base.ColorProperty#

Bases: MatProperty

More specific version of a MatProperty, specifically for colors

name :str#
type :str#
attrib :dict[str, str]#
validator :Callable#
validator_message :str#
atrset :str = color#
pyaltium.matlib.base.T#
class pyaltium.matlib.base.MatLibEntity#

Base class to represent a single item. This Entity will contain multiple properties.

type_id :str#
entity_id :uuid.UUID#
revision_id :uuid.UUID#
revision_date :datetime.datetime#
namespace :str =#
classmethod from_et(x, namespace='')#

Load in a XML Element to populate class data.

Parameters
Return type

T