HOME


Mini Shell 1.0
Redirecting to https://devs.lapieza.net/iniciar-sesion Redirecting to https://devs.lapieza.net/iniciar-sesion.
DIR: /proc/1991109/cwd/usr/lib/python3/dist-packages/uritemplate/__pycache__/
Upload File :
Current File : //proc/1991109/cwd/usr/lib/python3/dist-packages/uritemplate/__pycache__/api.cpython-311.pyc
�

��fa	�	���dZddlZddlmZddlmZddlmZdZ		dde
dejejd	ej
d
e
fd�Z	dde
dejejd	ej
d
efd�Zde
d
efd
�ZdS)zf

uritemplate.api
===============

This module contains the very simple API provided by uritemplate.

�N)�variable)�
OrderedSet)�URITemplate)rr�expand�partial�	variables�uri�var_dict�kwargs�returnc�8�t|��j|fi|��S)aqExpand the template with the given parameters.

    :param str uri: The templated URI to expand
    :param dict var_dict: Optional dictionary with variables and values
    :param kwargs: Alternative way to pass arguments
    :returns: str

    Example::

        expand('https://api.github.com{/end}', {'end': 'users'})
        expand('https://api.github.com{/end}', end='gists')

    .. note:: Passing values by both parts, may override values in
              ``var_dict``. For example::

                  expand('https://{var}', {'var': 'val1'}, var='val2')

              ``val2`` will be used instead of ``val1``.

    )rr�r	r
rs   �1/usr/lib/python3/dist-packages/uritemplate/api.pyrrs'��2#�;�s���"�8�6�6�v�6�6�6�c�8�t|��j|fi|��S)a�Partially expand the template with the given parameters.

    If all of the parameters for the template are not given, return a
    partially expanded template.

    :param dict var_dict: Optional dictionary with variables and values
    :param kwargs: Alternative way to pass arguments
    :returns: :class:`URITemplate`

    Example::

        t = URITemplate('https://api.github.com{/end}')
        t.partial()  # => URITemplate('https://api.github.com{/end}')

    )rrrs   rrr.s'��($�;�s���#�H�7�7��7�7�7rc�D�tt|��j��S)ahParse the variables of the template.

    This returns all of the variable names in the URI Template.

    :returns: Set of variable names
    :rtype: set

    Example::

        variables('https://api.github.com{/end})
        # => {'end'}
        variables('https://api.github.com/repos{/username}{/repository}')
        # => {'username', 'repository'}

    )rr�variable_names)r	s rrrEs�� �k�#�&�&�5�6�6�6r)N)�__doc__�typing�t�uritemplater�uritemplate.orderedsetr�uritemplate.templater�__all__�str�Optional�VariableValueDict�
VariableValuerrr�rr�<module>r s"�������� � � � � � �-�-�-�-�-�-�,�,�,�,�,�,�
I��
8<�7�7�	�7��j��3�4�7��$�7�	�	7�7�7�7�<8<�8�8�	�8��j��3�4�8��$�8��	8�8�8�8�.7�3�7�:�7�7�7�7�7�7r