B
    ÔùÓ`Ä  ã               @   sj   d Z ddlmZmZ ddlmZ ddlmZm	Z	 ddl
mZ deee	ddœd	d
„Zdee	edœdd„ZdS )z)Public APIs to dump configurations data.
é   )ÚPathOrIOInfoTÚ	InDataExT)Úmake)ÚfindÚMaybeParserTé   )ÚParserTN)ÚdataÚoutÚ	ac_parserÚreturnc             K   s(   t |ƒ}t||d�}|j| |f|Ž dS )aI  
    Save 'data' to 'out'.

    :param data: A mapping object may have configurations data to dump
    :param out:
        An output file path, a file, a file-like object, :class:`pathlib.Path`
        object represents the file or a namedtuple 'anyconfig.common.IOInfo'
        object represents output to dump some data to.
    :param ac_parser: Forced parser type or parser object
    :param options:
        Backend specific optional arguments, e.g. {"indent": 2} for JSON
        loader/dumper backend

    :raises: ValueError, UnknownProcessorTypeError, UnknownFileTypeError
    )Úforced_typeN)Úioinfo_maker   Údump)r	   r
   r   ÚoptionsZioiÚpsr© r   ú7/tmp/pip-unpacked-wheel-bpftjxoo/anyconfig/api/_dump.pyr      s    r   )r	   r   r   c             K   s   t d|d�}|j| f|ŽS )aT  
    Return string representation of 'data' in forced type format.

    :param data: Config data object to dump
    :param ac_parser: Forced parser type or ID or parser object
    :param options: see :func:`dump`

    :return: Backend-specific string representation for the given data
    :raises: ValueError, UnknownProcessorTypeError
    N)r   )r   Údumps)r	   r   r   r   r   r   r   r   $   s    r   )N)N)Ú__doc__Úcommonr   r   Zioinfor   r   Úparsersr   r   Z	datatypesr   r   Ústrr   r   r   r   r   Ú<module>   s   