Types

Note

Even though these types are made for public consumption and usage should be encouraged/easily possible it should be noted that these may be moved out to new libraries at various points in the future. If you are using these types without using the rest of this library it is strongly encouraged that you be a vocal proponent of getting these made into isolated libraries (as using these types in this manner is not the expected and/or desired usage).

Entity

class taskflow.types.entity.Entity(kind, name, metadata)[source]

Bases: object

Entity object that identifies some resource/item/other.

Variables:
  • kindimmutable type/kind that identifies this entity (typically unique to a library/application)
  • nameimmutable name that can be used to uniquely identify this entity among many other entities
  • metadataimmutable dictionary of metadata that is associated with this entity (and typically has keys/values that further describe this entity)

Failure

Graph

Notifier

Sets

class taskflow.types.sets.OrderedSet(iterable=None)[source]

Bases: _abcoll.Set, _abcoll.Hashable

A read-only hashable set that retains insertion/initial ordering.

It should work in all existing places that frozenset is used.

See: https://mail.python.org/pipermail/python-ideas/2009-May/004567.html for an idea thread that may eventually (someday) result in this (or similar) code being included in the mainline python codebase (although the end result of that thread is somewhat discouraging in that regard).

copy()[source]

Return a shallow copy of a set.

intersection(*sets)[source]

Return the intersection of two or more sets as a new set.

(i.e. elements that are common to all of the sets.)

issuperset(other)[source]

Report whether this set contains another set.

issubset(other)[source]

Report whether another set contains this set.

difference(*sets)[source]

Return the difference of two or more sets as a new set.

(i.e. all elements that are in this set but not the others.)

union(*sets)[source]

Return the union of sets as a new set.

(i.e. all elements that are in either set.)

Timing

Tree