Server : LiteSpeed
System : Linux server51.dnsbootclub.com 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
User : nandedex ( 1060)
PHP Version : 8.1.33
Disable Function : NONE
Directory :  /opt/cppython/lib/python3.8/site-packages/uritemplate/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]


Current File : //opt/cppython/lib/python3.8/site-packages/uritemplate/__pycache__/api.cpython-38.pyc
U

N��g	�@s�dZddlZddlmZddlmZddlmZdZ	de
ejejej
e
d�dd	�Zde
ejejej
ed�d
d�Ze
ed�d
d�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�returncKst|�j|f|�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�rr	r
�r
�</opt/cppython/lib/python3.8/site-packages/uritemplate/api.pyrsrcKst|�j|f|�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}')

    )rrrr
r
rr.sr)rrcCstt|�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'}

    )rrZvariable_names)rr
r
rrEsr)N)N)�__doc__�typing�tZuritemplaterZuritemplate.orderedsetrZuritemplate.templater�__all__�str�OptionalZVariableValueDictZ
VariableValuerrrr
r
r
r�<module>s(�
��
�

F1le Man4ger