# lookatme.contrib package

## Submodules

- lookatme.contrib.file_loader module
  - `FileSchema`
    - `FileSchema.Meta`
      - `FileSchema.Meta.render_module`
    - `FileSchema.load()`
    - `FileSchema.loads()`
    - `FileSchema.opts`
  - `LineRange`
    - `LineRange.opts`
  - `YamlRender`
    - `YamlRender.dumps()`
    - `YamlRender.loads()`
  - `render_code()`
  - `transform_data()`
  - `user_warnings()`
- lookatme.contrib.terminal module
  - `TerminalExSchema`
    - `TerminalExSchema.Meta`
      - `TerminalExSchema.Meta.render_module`
    - `TerminalExSchema.load()`
    - `TerminalExSchema.loads()`
    - `TerminalExSchema.opts`
  - `YamlRender`
    - `YamlRender.dumps()`
    - `YamlRender.loads()`
  - `render_code()`
  - `shutdown()`
  - `user_warnings()`

## Module contents

This module handles loading and using lookatme_contrib modules

> def loads(self, *args, **kwargs) -> Dict:

>   res = super(self.__class__, self).loads(*args, **kwargs) if res is None:

>   > raise ValueError(“Could not loads”)

>   return res

> def load(self, *args, **kwargs) -> Dict:

>   res = super(self.__class__, self).load(*args, **kwargs) if res is None:

>   > raise ValueError(“Could not load”)

>   return res

Contrib modules are directly used

lookatme.contrib.contrib_first(fn)

  A decorator that allows contrib modules to override default behavior of lookatme. E.g., a contrib module may override how a table is displayed to enable sorting, or enable displaying images rendered with ANSII color codes and box drawing characters, etc.

  Contrib modules may ignore chances to override default behavior by raising the `lookatme.contrib.IgnoredByContrib` exception.

lookatme.contrib.load_contribs(contrib_names, safe_contribs, ignore_load_failure=False)

  Load all contrib modules specified by `contrib_names`. These should all be namespaced packages under the `lookatmecontrib` namespace. E.g. `lookatmecontrib.calendar` would be an extension provided by a contrib module, and would be added to an `extensions` list in a slide’s YAML header as `calendar`.

  `safe_contribs` is a set of contrib names that are manually provided by the user by the `-e` flag or env variable of extensions to auto-load.

lookatme.contrib.shutdown_contribs()

  Call the shutdown function on all contrib modules

lookatme.contrib.validate_extension_mod(_ext_name, ext_mod)

  Validate the extension, returns an array of warnings associated with the module