finesse.datastore

Finesse datastore tools.

The datastore is intended for objects that should be cached during the execution of the current Python kernel. Code typically uses this instead of the more bug-prone singleton pattern (see #260).

Functions

has_singleton(cls)

Determine if cls is instantiated.

init_singleton(cls, *args, **kwargs)

Instantiate cls and return the object for the current and future calls.

invalidate([key])

Invalidate the datastore.

invalidate_singleton(cls)

Invalidate a singleton object with type cls.