Exemple #1
0
def dump(data, stream, **options):
    return _dump(data,
                 stream,
                 Dumper=Dumper,
                 default_flow_style=False,
                 indent=4, width=80,
                 **options)
Exemple #2
0
 def to_yaml(self, filename: str) -> None:
     """ Write this Project to a yaml file """
     if type(filename) is str:
         with open(filename, "w") as f:
             f.write(_dump(self))
     else:
         raise TypeError
Exemple #3
0
def dump(data, stream, **options):
    return _dump(data,
                 stream,
                 Dumper=Dumper,
                 default_flow_style=False,
                 indent=4,
                 width=80,
                 **options)
Exemple #4
0
 def yaml(self, rename_to: Optional[str] = None) -> str:
     data = self._yaml(rename_to)
     return _dump(data, default_flow_style=False)
Exemple #5
0
def ydump(*args, **kwargs):
    kwargs['width'] = 1000000  #we like long lines
    res = yaml._dump(*args, **kwargs)
    return res.strip()
Exemple #6
0
def yaml_dump(value):
    if optimized:
        return _dump(value, Dumper=CSafeDumper, default_flow_style=False)
    return _dump(value, default_flow_style=False)
Exemple #7
0
def dump(params, stream, Dumper=None, **kwargs):
    return _dump(params, stream, Dumper=Dumper or getDumper(), **kwargs)
Exemple #8
0
def dump(params, stream, Dumper=Dumper, **kwargs):
    return _dump(params, stream, Dumper=Dumper, **kwargs)
def dump(value):
    return _dump(value, Dumper=SafeDumper)
Exemple #10
0
def dump(value):
    return _dump(value, Dumper=SafeDumper)