atom.catom module

catom extension module

class atom.catom.CAtom

Bases: object

freeze()

Freeze the atom to prevent further modifications to its attributes.

get_member()

Get the named member for the atom.

has_observer()

Get whether the atom has the given observer for a given topic.

has_observers()

Get whether the atom has observers for a given topic.

notifications_enabled()

Get whether notification is enabled for the atom.

notify()

Call the registered observers for a given topic with positional and keyword arguments.

observe()

Register an observer callback to observe changes on the given topic(s).

set_notifications_enabled()

Enable or disable notifications for the atom.

unobserve()

Unregister an observer callback for the given topic(s).

class atom.catom.ChangeType(value)

Bases: IntFlag

An enumeration.

ANY = 255
CONTAINER = 32
CREATE = 1
DELETE = 4
EVENT = 8
PROPERTY = 16
UPDATE = 2
class atom.catom.DefaultValue(value)

Bases: IntEnum

An enumeration.

CallObject = 8
CallObject_Object = 9
CallObject_ObjectName = 10
DefaultDict = 5
Delegate = 7
Dict = 4
List = 2
MemberMethod_Object = 13
NoOp = 0
NonOptional = 6
ObjectMethod = 11
ObjectMethod_Name = 12
Set = 3
Static = 1
class atom.catom.DelAttr(value)

Bases: IntEnum

An enumeration.

Constant = 2
Delegate = 6
Event = 4
NoOp = 0
Property = 7
ReadOnly = 3
Signal = 5
Slot = 1
class atom.catom.GetAttr(value)

Bases: IntEnum

An enumeration.

CachedProperty = 6
CallObject_Object = 7
CallObject_ObjectName = 8
Delegate = 4
Event = 2
MemberMethod_Object = 11
NoOp = 0
ObjectMethod = 9
ObjectMethod_Name = 10
Property = 5
Signal = 3
Slot = 1
class atom.catom.GetState(value)

Bases: IntEnum

An enumeration.

Exclude = 1
Include = 0
IncludeNonDefault = 2
MemberMethod_Object = 5
ObjectMethod_Name = 4
Property = 3
class atom.catom.Member

Bases: object

add_static_observer()

Add the name of a method to call on all atoms when the member changes.

clone()

Create a clone of this member.

copy_static_observers()

Copy the static observers from one member into this member.

default_value_mode

Get the default value mode for the member.

del_slot()

Delete the atom’s slot value directly.

delattr_mode

Get the delattr mode for the member.

do_default_value()

Run the default value handler for member.

do_delattr()

Run the delattr handler for the member.

do_full_validate()

Run the validation and post validation handlers for the member.

do_getattr()

Run the getattr handler for the member.

do_post_getattr()

Run the post getattr handler for the member.

do_post_setattr()

Run the post setattr handler for the member.

do_post_validate()

Run the post validation handler for the member.

do_setattr()

Run the setattr handler for the member.

do_should_getstate()

Run the validation and post validation handlers for the member.

do_validate()

Run the validation handler for the member.

get_slot()

Get the atom’s slot value directly.

getattr_mode

Get the getattr mode for the member.

getstate_mode

Get the getstate mode for the member

has_observer()

Get whether or not the member already has the given observer.

has_observers()

Get whether or not this member has observers.

index

Get the index to which the member is bound

metadata

Get and set the metadata for the member.

name

Get the name to which the member is bound.

notify()

Notify the static observers for the given member and atom.

post_getattr_mode

Get the post getattr mode for the member.

post_setattr_mode

Get the post setattr mode for the member.

post_validate_mode

Get the post validate mode for the member.

remove_static_observer()

Remove the name of a method to call on all atoms when the member changes.

set_default_value_mode()

Set the default value mode for the member.

set_delattr_mode()

Set the delattr mode for the member.

set_getattr_mode()

Set the getattr mode for the member.

set_getstate_mode()

Set the getstate mode for the member.

set_index()

Set the index to which the member is bound. Use with extreme caution!

set_name()

Set the name to which the member is bound. Use with extreme caution!

set_post_getattr_mode()

Set the post getattr mode for the member.

set_post_setattr_mode()

Set the post setattr mode for the member.

set_post_validate_mode()

Set the post validate mode for the member.

set_setattr_mode()

Set the setattr mode for the member.

set_slot()

Set the atom’s slot value directly.

set_validate_mode()

Set the validate mode for the member.

setattr_mode

Get the setattr mode for the member.

static_observers()

Get a tuple of the static observers defined for this member

tag()

Tag the member with metatdata.

validate_mode

Get the validate mode for the member.

class atom.catom.PostGetAttr(value)

Bases: IntEnum

An enumeration.

Delegate = 1
MemberMethod_ObjectValue = 4
NoOp = 0
ObjectMethod_NameValue = 3
ObjectMethod_Value = 2
class atom.catom.PostSetAttr(value)

Bases: IntEnum

An enumeration.

Delegate = 1
MemberMethod_ObjectOldNew = 4
NoOp = 0
ObjectMethod_NameOldNew = 3
ObjectMethod_OldNew = 2
class atom.catom.PostValidate(value)

Bases: IntEnum

An enumeration.

Delegate = 1
MemberMethod_ObjectOldNew = 4
NoOp = 0
ObjectMethod_NameOldNew = 3
ObjectMethod_OldNew = 2
class atom.catom.SetAttr(value)

Bases: IntEnum

An enumeration.

CallObject_ObjectNameValue = 9
CallObject_ObjectValue = 8
Constant = 2
Delegate = 6
Event = 4
MemberMethod_ObjectValue = 12
NoOp = 0
ObjectMethod_NameValue = 11
ObjectMethod_Value = 10
Property = 7
ReadOnly = 3
Signal = 5
Slot = 1
class atom.catom.Validate(value)

Bases: IntEnum

An enumeration.

Bool = 1
Bytes = 6
BytesPromote = 7
Callable = 23
Coerced = 27
ContainerList = 13
DefaultDict = 16
Delegate = 28
Dict = 15
Enum = 22
FixedTuple = 11
Float = 4
FloatPromote = 5
FloatRange = 24
FloatRangePromote = 25
Instance = 18
Int = 2
IntPromote = 3
List = 12
MemberMethod_ObjectOldNew = 31
NoOp = 0
ObjectMethod_NameOldNew = 30
ObjectMethod_OldNew = 29
OptionalInstance = 17
OptionalTyped = 19
Range = 26
Set = 14
Str = 8
StrPromote = 9
Subclass = 21
Tuple = 10
Typed = 20
class atom.catom.atomclist(iterable=(), /)

Bases: atomlist

append()

L.append(object) – append object to end

extend()

L.extend(iterable) – extend list by appending elements from the iterable

insert()

L.insert(index, object) – insert object before index

pop([index]) item -- remove and return item at index (default last).

Raises IndexError if list is empty or index is out of range.

remove()

L.remove(value) – remove first occurrence of value. Raises ValueError if the value is not present.

reverse()

L.reverse() – reverse IN PLACE

sort()

L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; cmp(x, y) -> -1, 0, 1

class atom.catom.atomdict

Bases: dict

setdefault(k[, d]) D.get(k,d), also set D[k]=d if k not in D
update([E, ]**F) None. Update D from dict/iterable E and F
class atom.catom.atomlist(iterable=(), /)

Bases: list

append()

L.append(object) – append object to end

extend()

L.extend(iterable) – extend list by appending elements from the iterable

insert()

L.insert(index, object) – insert object before index

class atom.catom.atomref

Bases: object

class atom.catom.atomset

Bases: set

add()

Add an element to a set.

difference_update()

Update a set with the difference of itself and another.

intersection_update()

Update a set with the intersection of itself and another.

symmetric_difference_update()

Update a set with the symmetric difference of itself and another.

update()

Update a set with the union of itself and another.

class atom.catom.defaultatomdict

Bases: atomdict

atom.catom.reset_property()

Reset a Property member. For internal use only!