Skip to content

Module yapapi.props.base

Functions

as_list

def as_list(
    data:Union[str, List[str]]
) -> List[str]

Classes

Model

class Model(
    **kwargs
)

Helper class that provides a standard way to create an ABC using inheritance.

Ancestors (in MRO)

  • abc.ABC

Descendants

  • yapapi.props.Identification
  • yapapi.props.Activity
  • yapapi.props.com.Com
  • yapapi.props.inf.InfBase
  • yapapi.props.inf.ExeUnitRequest

Static methods

from_props
def from_props(
    props:Dict[str, str]
) -> ~ME
keys
def keys(

)

Props

class Props(
    /,
    *args,
    **kwargs
)

dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2)

Ancestors (in MRO)

  • typing.Dict
  • builtins.dict
  • typing.MutableMapping
  • collections.abc.MutableMapping
  • typing.Mapping
  • collections.abc.Mapping
  • typing.Collection
  • collections.abc.Collection
  • collections.abc.Sized
  • typing.Iterable
  • collections.abc.Iterable
  • typing.Container
  • collections.abc.Container
  • typing.Generic

Methods

clear
def clear(
    ...
)

D.clear() -> None. Remove all items from D.

copy
def copy(
    ...
)

D.copy() -> a shallow copy of D

fromkeys
def fromkeys(
    iterable,
    value=None,
    /
)

Returns a new dict with keys from iterable and values equal to value.

get
def get(
    ...
)

D.get(k[,d]) -> D[k] if k in D, else d. d defaults to None.

items
def items(
    ...
)

D.items() -> a set-like object providing a view on D's items

keys
def keys(
    ...
)

D.keys() -> a set-like object providing a view on D's keys

pop
def pop(
    ...
)

D.pop(k[,d]) -> v, remove specified key and return the corresponding value. If key is not found, d is returned if given, otherwise KeyError is raised

popitem
def popitem(
    ...
)

D.popitem() -> (k, v), remove and return some (key, value) pair as a 2-tuple; but raise KeyError if D is empty.

setdefault
def setdefault(
    ...
)

D.setdefault(k[,d]) -> D.get(k,d), also set D[k]=d if k not in D

update
def update(
    ...
)

D.update([E, ]**F) -> None. Update D from dict/iterable E and F. If E is present and has a .keys() method, then does: for k in E: D[k] = E[k] If E is present and lacks a .keys() method, then does: for k, v in E: D[k] = v In either case, this is followed by: for k in F: D[k] = F[k]

values
def values(
    ...
)

D.values() -> an object providing a view on D's values