bundles / traitlets latest / traitlets / config / configurable / SingletonScope
class
traitlets.config.configurable:SingletonScope
Signature
class SingletonScope(base: type[SingletonConfigurable]) → NoneMembers
Summary
An isolated singleton registry, activated for a dynamic extent.
Extended Summary
While active (with scope():), SingletonConfigurable.instance on any subclass of base resolves within this registry — creating fresh instances on first use — in the current thread/async task. Re-enterable: the registry persists across activations.
Scope SingletonConfigurable itself for a complete blank slate covering every singleton in the process.
Aliases
traitlets.config.SingletonScope