svgen.attribute
index
/home/vkottler/src/vkottler/workspace/svgen/svgen/attribute/__init__.py

svgen - A module for XML-style attribute interfaces.

 
Package Contents
       
style
viewbox

 
Classes
       
abc.ABC(builtins.object)
Attribute
SimpleAttribute

 
class Attribute(abc.ABC)
    An interface for an XML-style attribute.
 
 
Method resolution order:
Attribute
abc.ABC
builtins.object

Methods defined here:
__eq__(self, other: object) -> bool
Determine if two attributes are the same.
encode(self, quote: str = '"', force: bool = False) -> str
Convert this attribute to a string.

Class methods defined here:
decode(key: str, value: str) -> ~T from abc.ABCMeta
Create this attribute from a string.

Readonly properties defined here:
key
Get the string key for this attribute.
value
Get the string value for this attribute.

Data descriptors defined here:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes defined here:
__abstractmethods__ = frozenset({'decode', 'value'})
__hash__ = None

 
class SimpleAttribute(Attribute)
    SimpleAttribute(name: str, value: Union[str, int, float, bool]) -> None
 
A simple, concrete implementation for attribute.
 
 
Method resolution order:
SimpleAttribute
Attribute
abc.ABC
builtins.object

Methods defined here:
__init__(self, name: str, value: Union[str, int, float, bool]) -> None
Construct a simple attribute, one with just a key (name) and value.

Class methods defined here:
decode(key: str, value: str) -> 'SimpleAttribute' from abc.ABCMeta
Create this attribute from a string.

Static methods defined here:
from_dict(data: Dict[str, Union[str, int, float]]) -> List[svgen.attribute.Attribute]
Get a list of attributes from dictionary data.

Readonly properties defined here:
value
Get the string value for this attribute.

Data and other attributes defined here:
__abstractmethods__ = frozenset()

Methods inherited from Attribute:
__eq__(self, other: object) -> bool
Determine if two attributes are the same.
encode(self, quote: str = '"', force: bool = False) -> str
Convert this attribute to a string.

Readonly properties inherited from Attribute:
key
Get the string key for this attribute.

Data descriptors inherited from Attribute:
__dict__
dictionary for instance variables
__weakref__
list of weak references to the object

Data and other attributes inherited from Attribute:
__hash__ = None

 
Functions
       
attributes(data: Union[Dict[str, Union[str, int, float, bool]], List[svgen.attribute.Attribute], svgen.attribute.Attribute] = None) -> List[svgen.attribute.Attribute]
Get attributes from either an existing list of attributes, or dictionary
data.

 
Data
        AttributeValue = typing.Union[str, int, float, bool]
Dict = typing.Dict
List = typing.List
PossibleAttributes = typing.Union[typing.Dict[str, typing.Union[str, ....attribute.Attribute], svgen.attribute.Attribute]
T = ~T
Type = typing.Type
Union = typing.Union
XMLNS = <svgen.attribute.SimpleAttribute object>