Name
- class naming.Name(name='', sep=' ')[source]
Base class for name objects.
Each subclass may have its own config attribute that should be a dictionary in the form of {field: pattern} where pattern is a valid regular expression.
Classes may as well have a drop iterable attribute representing the fileds they want to ignore from their bases and a join dictionary attribute for nesting existing fields into new ones (or to override other fields).
All field names should be unique. No duplicates are allowed.
- Example:
- classmethod cast_config(config)
Cast config to grouped regular expressions.
- static cast(value, name='')
Cast value to a grouped regular expression when name is provided.
- get(**values)
Get a new name string from this object’s name values.
- Parameters:
values – Variable keyword arguments where the key should refer to a field on this object that will use the provided value to build the new name.
- Return type:
- get_pattern_list()
Fields / properties names (sorted) to be used when building names. Defaults to the keys of self.config
- property name: str
This object’s solved name.
- Raises:
ValueError – If an invalid string is provided when setting the attribute.