|
OpenQuizz
Une application de gestion des contenus pédagogiques
|
Data Structures | |
| class | TomlArraySeparatorEncoder |
| class | TomlEncoder |
| class | TomlNumpyEncoder |
| class | TomlPathlibEncoder |
| class | TomlPreserveCommentEncoder |
| class | TomlPreserveInlineDictEncoder |
Functions | |
| def | dump (o, f, encoder=None) |
| def | dumps (o, encoder=None) |
Variables | |
| unicode | |
| def pip._vendor.toml.encoder.dump | ( | o, | |
| f, | |||
encoder = None |
|||
| ) |
Writes out dict as toml to a file
Args:
o: Object to dump into toml
f: File descriptor where the toml should be stored
encoder: The ``TomlEncoder`` to use for constructing the output string
Returns:
String containing the toml corresponding to dictionary
Raises:
TypeError: When anything other than file descriptor is passed
| def pip._vendor.toml.encoder.dumps | ( | o, | |
encoder = None |
|||
| ) |
Stringifies input dict as toml
Args:
o: Object to dump into toml
encoder: The ``TomlEncoder`` to use for constructing the output string
Returns:
String containing the toml corresponding to dict
Examples:
```python
>>> import toml
>>> output = {
... 'a': "I'm a string",
... 'b': ["I'm", "a", "list"],
... 'c': 2400
... }
>>> toml.dumps(output)
'a = "I\'m a string"\nb = [ "I\'m", "a", "list",]\nc = 2400\n'
```
| unicode |