B
    ÔùÓ`à  ã            $   @   s<  d Z ddlmZ ddlmZmZ ddlmZmZm	Z	m
Z
 ddlmZ ddlmZ ddlmZmZmZmZmZmZ dd	lmZmZmZmZmZmZmZmZ dd
lm Z m!Z!m"Z"m#Z#m$Z$m%Z%m&Z&m'Z' ddl(m)Z) ddl*m+Z+m,Z,m-Z- dZ.dd„ Z/dddddddddddddddddd d!d"d#d$d%d&d'd(d)d*d+d,d-d.d/d0d1d2g$Z0d3S )4aœ  Public APIs of anyconfig module.

.. versionchanged:: 0.10.2

   - Re-structured APIs and split into sub modules
   - Added type hints

.. versionchanged:: 0.9.9

   - Removed the API 'find_loader'
   - Added new APIs :func:`find` and :func:`findall` to :func:`find parsers`
     (loaders and dumpers) to suppport to find multiple parsers, and replace
     the API 'find_loader'
   - Added new APIs :func:`list_by_cid`, :func:`list_by_type` and
     :func:`list_by_extension` to list parsers by various viewpoints.

.. versionadded:: 0.9.8

   - Added new API load_plugins to [re-]load plugins

.. versionadded:: 0.9.5

   - Added pathlib support. Now all of load and dump APIs can process
     pathlib.Path object basically.
   - 'ignore_missing' keyword option for load APIs are now marked as deprecated
     and will be removed soon.
   - Allow to load data other than mapping objects for some backends such as
     JSON and YAML.

.. versionadded:: 0.8.3

   - Added ac_dict keyword option to pass dict factory (any callable like
     function or class) to make dict-like object in backend parsers.
   - Added ac_query keyword option to query data with JMESPath expression.
   - Added experimental query api to query data with JMESPath expression.
   - Removed ac_namedtuple keyword option.
   - Export :func:`merge`.
   - Stop exporting :func:`to_container` which was deprecated and removed.

.. versionadded:: 0.8.2

   - Added new API, version to provide version information.

.. versionadded:: 0.8.0

   - Removed set_loglevel API as it does not help much.
   - Added :func:`open` API to open files with appropriate open mode.
   - Added custom exception classes, :class:`UnknownProcessorTypeError` and
     :class:`UnknownFileTypeError` to express specific errors.
   - Change behavior of the API :func:`find_loader` and others to make them
     fail firt and raise exceptions (ValueError, UnknownProcessorTypeError or
     UnknownFileTypeError) as much as possible if wrong parser type for uknown
     file type was given.

.. versionadded:: 0.5.0

   - Most keyword arguments passed to APIs are now position independent.
   - Added ac_namedtuple parameter to \*load and \*dump APIs.

.. versionchanged:: 0.3

   - Replaced 'forced_type' optional argument of some public APIs with
     'ac_parser' to allow skip of config parser search by passing parser object
     previously found and instantiated.

     Also removed some optional arguments, 'ignore_missing', 'merge' and
     'marker', from definitions of some public APIs as these may not be changed
     from default in common use cases.

.. versionchanged:: 0.2

   - Now APIs :func:`find_loader`, :func:`single_load`, :func:`multi_load`,
     :func:`load` and :func:`dump` can process a file/file-like object or a
     list of file/file-like objects instead of a file path or a list of file
     paths.

.. versionadded:: 0.2

   - Export factory method (create) of anyconfig.mergeabledict.MergeableDict
é   )Ú
MaybeDataT)ÚdumpÚdumps)Úsingle_loadÚ
multi_loadÚloadÚloads)Úopené   )ÚParserT)ÚIOInfoÚInDataTÚUnknownFileTypeErrorÚUnknownParserTypeErrorÚUnknownProcessorTypeErrorÚValidationError)Ú
MS_REPLACEÚMS_NO_REPLACEÚMS_DICTSÚMS_DICTS_AND_LISTSÚMERGE_STRATEGIESÚmergeÚgetÚset_)Úload_pluginsÚ
list_typesÚlist_by_cidÚlist_by_typeÚlist_by_extensionÚfindallÚfindÚMaybeParserT)Ú	try_query)ÚvalidateÚis_validÚ
gen_schemaz0.11.0c               C   s
   t  d¡S )zS
    :return: A tuple of version info, (major, minor, release), e.g. (0, 8, 2)
    Ú.)Ú__version__Úsplit© r)   r)   ú:/tmp/pip-unpacked-wheel-bpftjxoo/anyconfig/api/__init__.pyÚversionw   s    r+   r   r   r   r   r   r   r   r	   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r    r!   r"   r#   r$   r%   N)1Ú__doc__Z	datatypesr   Ú_dumpr   r   Ú_loadr   r   r   r   Ú_openr	   Úbackendr   Úcommonr   r   r   r   r   r   Zdictsr   r   r   r   r   r   r   r   Úparsersr   r   r   r   r   r   r    r!   Úqueryr"   Zschemar#   r$   r%   r'   r+   Ú__all__r)   r)   r)   r*   Ú<module>U   s8    ((