{ } Raw JSON

bundles / traitlets latest / traitlets / config / loader / JSONFileConfigLoader

class

traitlets.config.loader:JSONFileConfigLoader

source: /traitlets/config/loader.py:562

Signature

class JSONFileConfigLoader(filename: str, path: str | None = None, **kw: t.Any) → None

Members

Summary

A JSON file loader for config

Extended Summary

Can also act as a context manager that rewrite the configuration file to disk on exit.

Example

with JSONFileConfigLoader('myapp.json','/home/jupyter/configurations/') as c:
    c.MyNewConfigurable.new_value = 'Updated'

Aliases

  • traitlets.config.JSONFileConfigLoader