pydio.keys - Key wrappers for special purposes

class pydio.keys.Variant(key: Hashable, **kwargs: Hashable)

Bases: collections.abc.Hashable

A special form of key that can have user-defined parameters attached.

This class can be used if you need to use same key twice, but return different objects depending on additional parameters given (which can be accessed by object factory)

Parameters
  • key – The key to be wrapped

  • kwargs – Additional parameters to be bound with given key

property key

Wrapped key.

property kwargs

Dict with parameters given in constructor.