mdg.tools package

Submodules

mdg.tools.case module

String convert functions

mdg.tools.case.alphanumcase(string: str) str[source]

Cuts all non-alphanumeric symbols, i.e. cuts all expect except 0-9, a-z and A-Z.

Args:

string: String to convert.

Returns:

string: String with cutted non-alphanumeric symbols.

mdg.tools.case.backslashcase(string: str) str[source]

Convert string into spinal case. Join punctuation with backslash.

Args:

string: String to convert.

Returns:

string: Spinal cased string.

mdg.tools.case.camelcase(string)[source]
mdg.tools.case.capitalcase(string: str) str[source]

Convert string into capital case. First letters will be uppercase.

Args:

string: String to convert.

Returns:

string: Capital case string.

mdg.tools.case.constcase(string: str) str[source]

Convert string into upper snake case. Join punctuation with underscore and convert letters into uppercase.

Args:

string: String to convert.

Returns:

string: Const cased string.

mdg.tools.case.dotcase(string: str) str[source]

Convert string into dot case. Join punctuation with dot.

Args:

string: String to convert.

Returns:

string: Dot cased string.

mdg.tools.case.lowercase(string: str) str[source]

Convert string into lower case.

Args:

string: String to convert.

Returns:

string: Lowercase case string.

mdg.tools.case.pascalcase(string: str) str[source]

Convert string into pascal case.

Args:

string: String to convert.

Returns:

string: Pascal case string.

mdg.tools.case.pathcase(string: str) str[source]

Convert string into path case. Join punctuation with slash.

Args:

string: String to convert.

Returns:

string: Path cased string.

mdg.tools.case.sentencecase(string: str) str[source]

Convert string into sentence case. First letter capped and each punctuations are joined with space.

Args:

string: String to convert.

Returns:

string: Sentence cased string.

mdg.tools.case.snakecase(string)[source]
mdg.tools.case.spinalcase(string: str) str[source]

Convert string into spinal case. Join punctuation with hyphen.

Args:

string: String to convert.

Returns:

string: Spinal cased string.

mdg.tools.case.titlecase(string: str) str[source]

Convert string into sentence case. First letter capped while each punctuations is capitalsed and joined with space.

Args:

string: String to convert.

Returns:

string: Title cased string.

mdg.tools.case.trimcase(string: str) str[source]

Convert string into trimmed string.

Args:

string: String to convert.

Returns:

string: Trimmed case string

mdg.tools.case.uppercase(string: str) str[source]

Convert string into upper case.

Args:

string: String to convert.

Returns:

string: Uppercase case string.

mdg.tools.filters module

mdg.tools.io module

mdg.tools.io.dict_to_obj(input: dict, base_object_class, references: dict = {}) object[source]
mdg.tools.io.dict_to_obj_pass1(input: dict, base_object_class, references: dict = {}) Tuple[Any, dict][source]

Creates objects from input dictionary. Pass 1 keeps references and compiles a list of objects with ids used in pass 2.

mdg.tools.io.dict_to_obj_pass2(obj: Any, references: dict) None[source]

Pass 2 walks through objects and replaces attributes which are references with the actual class.

mdg.tools.io.obj_to_dict(obj: Any, base_dict={}) dict[source]

Creates nested dictionaries from input object

mdg.tools.mdg_tool module

mdg.tools.mdg_tool.addtemplate(args)[source]
mdg.tools.mdg_tool.daemon(args)[source]
mdg.tools.mdg_tool.dumps(args)[source]
mdg.tools.mdg_tool.generate(args)[source]
mdg.tools.mdg_tool.main()[source]
mdg.tools.mdg_tool.startproject(args)[source]

mdg-tool startproject –source=”sqlite:///Customer Model.qea” –parser=sparx –model_package=<GUID> –default_dialect=django config-customer-graphql.yaml

mdg.tools.mdg_tool.validate(args)[source]

mdg.tools.schema module

mdg.tools.sparx_db_models_raw module

Module contents