godot_project_parser

Parser and editor of project.godot files.

Exceptions:

TOMLDecodeError([msg, doc, pos])

An error raised if a document is not valid TOML.

Functions:

dump(obj, fp)

Reconstruct a project.godot file and write to the given file.

dump_to_path(obj, path)

Reconstruct a project.godot file and write to the given path.

dumps(obj)

Reconstruct a project.godot file and return as a string.

load(__fp, *[, parse_float])

Parse project.godot from a binary file object.

load_path(path, *[, parse_float])

Parse project.godot from the given path.

loads(__s, *[, parse_float])

Parse project.godot from a string.

exception TOMLDecodeError(msg=<class 'DEPRECATED_DEFAULT'>, doc=<class 'DEPRECATED_DEFAULT'>, pos=<class 'DEPRECATED_DEFAULT'>, *args)[source]

Bases: ValueError

An error raised if a document is not valid TOML.

Adds the following attributes to ValueError: msg: The unformatted error message doc: The TOML document being parsed pos: The index of doc where parsing failed lineno: The line corresponding to pos colno: The column corresponding to pos

dump(obj, fp)[source]

Reconstruct a project.godot file and write to the given file.

Parameters

obj (Mapping[str, Any])

dump_to_path(obj, path)[source]

Reconstruct a project.godot file and write to the given path.

Parameters
dumps(obj)[source]

Reconstruct a project.godot file and return as a string.

Parameters

obj (Mapping[str, Any])

Return type

str

load(__fp, *, parse_float=<class 'float'>)[source]

Parse project.godot from a binary file object.

Parameters
Return type

Dict[str, Any]

load_path(path, *, parse_float=<class 'float'>)[source]

Parse project.godot from the given path.

Parameters
Return type

Dict[str, Any]

loads(__s, *, parse_float=<class 'float'>)[source]

Parse project.godot from a string.

Parameters
Return type

Dict[str, Any]