dump_json

dump_json(key, *subkeys, name, obj, open_kwargs=None, json_dump_kwargs=None)[source]

Dump an object to a file with json.

Parameters:
  • key (str) – The module name

  • subkeys (str) – A sequence of additional strings to join. If none are given, returns the directory for this module.

  • name (str) – The name of the file to open

  • obj (Any) – The object to dump

  • open_kwargs (Optional[Mapping[str, Any]]) – Additional keyword arguments passed to open()

  • json_dump_kwargs (Optional[Mapping[str, Any]]) – Keyword arguments to pass through to json.dump().

Return type:

None