Welcome to Python Callable Queue’s documentation!

The Call Queue stores functions and methods along with their arguments for later retrieval and processing.

Call Queue’s can be organized by a key. Objects that share the same key will share the same queue.

class queueable.Queueable(queue_key)

Queueable(queue_key)

Mixin class that allows ojects to share a queue of callable objects. It is intended to be mixed into interfaces for database objects.

Groups of instances can be given their own queues by differentiating the queue_key:

Parent = Queueable( 'family')
Sister = Queueable('family')
Brother = Queueable('family')
Cousin = Queueable('relative')

The first three objects share a queue, the fourth does not. Loading callables by Parent, Sister, or Brother can be executed by calling any of their process_queue() methods, and in doing so any callables in the ‘relative’ queue are untouched.

This is useful if you have a GUI interface that allows for a command-line interface as well. Both sets of interfaces can have their own queue.

allow_duplicates

Flag to check if a callable is already in the queue before adding it

deny_duplicates

Flag to check if a callable is already in the queue before adding it

do_queue_item(nth)

Does the nth item in the queue

get_allow_duplicates()

Flag to check if a callable is already in the queue before adding it

get_deny_duplicates()

Flag to check if a callable is already in the queue before adding it

get_queue()

Returns a list of (callable, args, kwargs) tuples in the queue.

get_queued_funcs()

Returns a list of all callable objects without arguments

process_queue()

Calls each function in the Queable objects queue, and clears the queue afterward

queue(func[, *args, **kwargs])

Adds the function and arguments to the queue.

classmethod queue_keys()

Returns a list of all used keys

queue_len(self)

Returns the length of the queue for this object

Contents: