inspect
Platypush documentation
inspect
- class platypush.plugins.inspect.BackendModel(backend, prefix='', html_doc: Optional[bool] = False)[source]
Bases:
Model
- class platypush.plugins.inspect.EventModel(event, prefix='', html_doc: Optional[bool] = False)[source]
Bases:
Model
- class platypush.plugins.inspect.InspectPlugin(**kwargs)[source]
Bases:
Plugin
This plugin can be used to inspect platypush plugins and backends
Requires:
docutils (
pip install docutils
) - optional, for HTML doc generation
- get_all_backends(html_doc: Optional[bool] = None)[source]
- Parameters:
html_doc – If True then the docstring will be parsed into HTML (default: False)
- get_all_events(html_doc: Optional[bool] = None)[source]
- Parameters:
html_doc – If True then the docstring will be parsed into HTML (default: False)
- get_all_plugins(html_doc: Optional[bool] = None)[source]
- Parameters:
html_doc – If True then the docstring will be parsed into HTML (default: False)
- get_all_responses(html_doc: Optional[bool] = None)[source]
- Parameters:
html_doc – If True then the docstring will be parsed into HTML (default: False)
- class platypush.plugins.inspect.PluginModel(plugin, prefix='', html_doc: Optional[bool] = False)[source]
Bases:
Model
- class platypush.plugins.inspect.ProcedureEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]
Bases:
JSONEncoder
- default(o)[source]
Implement this method in a subclass such that it returns a serializable object for
o
, or calls the base implementation (to raise aTypeError
).For example, to support arbitrary iterators, you could implement default like this:
def default(self, o): try: iterable = iter(o) except TypeError: pass else: return list(iterable) # Let the base class default method raise the TypeError return JSONEncoder.default(self, o)