ID Property Access (idprop.types)
- class idprop.types.IDPropertyArray
An array of values with a fixed type, supporting indexing and slicing.
- to_list()
Return the array as a list.
- Returns:
The array as a list.
- Return type:
list[int] | list[float] | list[bool]
- typecode
The type of the data in the array {‘f’: float (32-bit), ‘d’: double (64-bit), ‘i’: int, ‘b’: bool}. Both ‘f’ and ‘d’ use Python’s
floattype but differ in storage precision.
- class idprop.types.IDPropertyGroup
A dictionary-like group of ID properties, supporting key access, iteration, and membership testing.
- clear()
Clear all members from this group.
- get(key, default=None)
Return the value for key, if it exists, else default.
- Parameters:
key (str) – The key to look up.
default (Any) – Value to return if key is not found.
- Returns:
The value for the key, or default if not found.
- Return type:
Any
- items()
Return a view of the items in the group, behaves like dictionary method items.
- Returns:
A view of the items.
- Return type:
- keys()
Return a view of the keys in the group.
- Returns:
A view of the keys.
- Return type:
- pop(key, default)
Remove an item from the group, returning a Python representation.
- Raises:
KeyError – When the item doesn’t exist and no default is given.
- Parameters:
key (str) – Name of item to remove.
default (Any) – Value to return when key isn’t found (optional, a
KeyErroris raised when omitted and the key is not found).
- Returns:
A Python representation of the removed item, or default.
- Return type:
Any
- to_dict()
Return a purely Python version of the group.
- Returns:
A dictionary representation of the group.
- Return type:
dict[str, Any]
- update(other)
Update key-value pairs from other, overwriting existing keys.
Note
Unlike
dict.update(), keyword arguments are not supported.- Parameters:
other (
IDPropertyGroup| dict[str, Any]) – Updates the values in the group with this.
- values()
Return the values associated with this group.
- Returns:
A view of the values.
- Return type:
- name
The name of this Group.
- class idprop.types.IDPropertyGroupIterItems
Iterator over
IDPropertyGroupitems (key/value pairs).
- class idprop.types.IDPropertyGroupIterKeys
Iterator over
IDPropertyGroupkeys.
- class idprop.types.IDPropertyGroupIterValues
Iterator over
IDPropertyGroupvalues.
- class idprop.types.IDPropertyGroupViewItems
A view of
IDPropertyGroupitems as key/value pairs (supportslen(),in, iteration, andreversed()).
- class idprop.types.IDPropertyGroupViewKeys
A view of
IDPropertyGroupkeys (supportslen(),in, iteration, andreversed()).
- class idprop.types.IDPropertyGroupViewValues
A view of
IDPropertyGroupvalues (supportslen(),in, iteration, andreversed()).