+
    ÃHàj¦  ã                   óv   € R t ^ RIt^ RIt^ RIHt ^ RIHt ]P                  ! R4      tR R lt	 ! R R4      t
R# )	zê

uritemplate.template
====================

This module contains the essential inner workings of uritemplate.

What treasures await you:

- URITemplate class

You see a treasure chest of knowledge in front of you.
What do you do?
>

N)Ú
orderedset)Úvariablez	{([^}]+)}c                ó¢   € V ^8„  d   QhR\         P                  \        P                  ,          R\        P                  R\        P                  /# )é   Úvar_dictÚ	overridesÚreturn)ÚtÚOptionalr   ÚVariableValueDict)Úformats   "Ú–/home/ubuntu/.hermes/installs/5f0a1ff4045d044e/environments/50f6b671e3f94b538e344231dfcb664f/venv/lib/python3.14/site-packages/uritemplate/template.pyÚ__annotate__r      sA   € ÷ ñ Ü�j‰jœ×3Ñ3Õ4ðä×)Ñ)ðô ×Ññó    c                 ó\   € V '       d$   V P                  4       pVP                  V4       V# V# ©N)ÚcopyÚupdate)r   r   Úoptss   && r   Ú_merger      s)   € ÷ Ø�}‰}‹ˆØ�‰�IÔØˆØÐr   c                   ó¼   a € ] tR t^&t o RtV 3R lR ltV 3R lR ltV 3R lR ltV 3R lR	 ltV 3R
 lR lt	V 3R lR lt
RV 3R lR lltRV 3R lR lltRtV tR# )ÚURITemplatea¹  This parses the template and will be used to expand it.

This is the most important object as the center of the API.

Example::

    from uritemplate import URITemplate
    import requests


    t = URITemplate(
        'https://api.github.com/users/sigmavirus24/gists{/gist_id}'
    )
    uri = t.expand(gist_id=123456)
    resp = requests.get(uri)
    for gist in resp.json():
        print(gist['html_url'])

Please note::

    str(t)
    # 'https://api.github.com/users/sigmavirus24/gists{/gistid}'
    repr(t)  # is equivalent to
    # URITemplate(str(t))
    # Where str(t) is interpreted as the URI string.

Also, ``URITemplates`` are hashable so they can be used as keys in
dictionaries.

c                ó    <€ V ^8„  d   QhRS[ /# )r   Úuri©Ústr)r   Ú__classdict__s   "€r   r   ÚURITemplate.__annotate__F   s   ø€ ÷ .ñ .™Cñ .r   c                óŒ  € Wn         \        P                  V P                   4       Uu. uF.  p\        P                  ! VP                  4       ^ ,          4      NK0  	  upV n        \        P                  ! 4       V n	        V P                   F1  pVP                   F  pV P                  P                  V4       K   	  K3  	  R# u upi )é    N)r   Útemplate_reÚfinditerr   ÚURIVariableÚgroupsÚ	variablesr   Ú
OrderedSetÚvariable_namesÚadd)Úselfr   ÚmÚvarÚnames   &&   r   Ú__init__ÚURITemplate.__init__F   s–   € àŒô
 !×)Ñ)¨$¯(©(Ô3ó8
á3�ô × Ò  §¡£¨A¥Ö/Ù3ñ8
ˆŒô
 )×3Ò3Ó5ˆÔØ—>”>ˆCØ×*Ô*�Ø×#Ñ#×'Ñ'¨Ö-ó +ó "ùò8
s   ¨4Cc                ó    <€ V ^8„  d   QhRS[ /# ©r   r   r   )r   r   s   "€r   r   r   U   s   ø€ ÷ *ñ *™#ñ *r   c                ó   € R V ,          # )zURITemplate("%s")© ©r(   s   &r   Ú__repr__ÚURITemplate.__repr__U   s   € Ø" TÕ)Ð)r   c                ó    <€ V ^8„  d   QhRS[ /# r/   r   )r   r   s   "€r   r   r   X   s   ø€ ÷ ñ ™ñ r   c                ó   € V P                   # r   )r   r2   s   &r   Ú__str__ÚURITemplate.__str__X   s   € Ø�x‰xˆr   c                ó&   <€ V ^8„  d   QhRS[ RS[/# )r   Úotherr   )ÚobjectÚbool)r   r   s   "€r   r   r   [   s   ø€ ÷ %ñ %™Fð %¡tñ %r   c                ól   € \        V\        4      '       g   \        # V P                  VP                  8H  # r   )Ú
isinstancer   ÚNotImplementedr   )r(   r:   s   &&r   Ú__eq__ÚURITemplate.__eq__[   s(   € Ü˜%¤×-Ò-Ü!Ð!Ø�x‰x˜5Ÿ9™9Ñ$Ð$r   c                ó    <€ V ^8„  d   QhRS[ /# r/   )Úint)r   r   s   "€r   r   r   `   s   ø€ ÷ ñ ™#ñ r   c                ó,   € \        V P                  4      # r   )Úhashr   r2   s   &r   Ú__hash__ÚURITemplate.__hash__`   s   € Ü�D—H‘H‹~Ðr   c                ó@   <€ V ^8„  d   QhRS[ P                  RS[RS[/# )r   r   Úreplacer   )r   r   r<   r   )r   r   s   "€r   r   r   c   s+   ø€ ÷ 7ñ 7Ù ×2Ñ2ð7Ù=Að7á	ñ7r   c                ó(  a€ V P                   '       g   V P                  # Tp/ oV P                    F#  pSP                  VP                  V4      4       K%  	  R  V3R llpR V3R llpV'       d   TMTp\        P                  WpP                  4      # )c                ó(   € V ^8„  d   QhRRR\         /# ©r   Úmatchzre.Match[str]r   r   )r   s   "r   r   Ú)URITemplate._expand.<locals>.__annotate__n   s   € ÷ 	7ñ 	7˜ð 	7´3ñ 	7r   c                 óR   <€ SP                  V P                  4       ^ ,          R4      # )r   Ú )Úgetr#   )rM   Úexpandeds   &€r   Úreplace_allÚ(URITemplate._expand.<locals>.replace_alln   s   ø€ Ø—<‘< §¡£¨qÕ 1°2Ó6Ð6r   c                ó(   € V ^8„  d   QhRRR\         /# rL   r   )r   s   "r   r   rN   q   s   € ÷ 	4ñ 	4 ?ð 	4´sñ 	4r   c                 óz   <€ V P                  4       ^ ,          pRV,          pSP                  V4      ;'       g    T# )r   z{%s})r#   rQ   )rM   Úmatch_groupr*   rR   s   &  €r   Úreplace_partialÚ,URITemplate._expand.<locals>.replace_partialq   s4   ø€ ØŸ,™,›.¨Õ+ˆKØ˜;Õ&ˆCØ—<‘< Ó,×3Ð3°Ð3r   )r$   r   r   Úexpandr    Úsub)	r(   r   rI   Ú	expansionÚvrS   rX   Úreplace_funcrR   s	   &&&     @r   Ú_expandÚURITemplate._expandc   sv   ø€ ð �~�~ˆ~Ø—8‘8ˆOàˆ	Ø%'ˆØ—”ˆAØ�O‰O˜AŸH™H YÓ/Ö0ñ  ÷	7ð 	7÷	4ð 	4÷
 +2‘°{ˆä�‰˜|¯X©XÓ6Ð6r   Nc                óx   <€ V ^8„  d   QhRS[ P                  S[P                  ,          RS[P                  RS[/# )r   r   Úkwargsr   )r	   r
   r   r   ÚVariableValuer   )r   r   s   "€r   r   r   z   s>   ø€ ÷ =ñ =á—*‘*™X×7Ñ7Õ8ð=ñ ×(Ñ(ð=ñ 
ñ	=r   c                ó8   € V P                  \        W4      R4      # )a  Expand the template with the given parameters.

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

Example::

    t = URITemplate('https://api.github.com{/end}')
    t.expand({'end': 'users'})
    t.expand(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``.

F)r_   r   ©r(   r   rb   s   &&,r   rZ   ÚURITemplate.expandz   s   € ð2 �|‰|œF 8Ó4°eÓ<Ð<r   c                óv   <€ V ^8„  d   QhRS[ P                  S[P                  ,          RS[P                  RR/# )r   r   rb   r   r   )r	   r
   r   r   rc   )r   r   s   "€r   r   r   •   sC   ø€ ÷ Iñ Iá—*‘*™X×7Ñ7Õ8ðIñ ×(Ñ(ðIð 
ñ	Ir   c                óJ   € \        V P                  \        W4      R4      4      # )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}')

T)r   r_   r   re   s   &&,r   ÚpartialÚURITemplate.partial•   s   € ô( ˜4Ÿ<™<¬¨xÓ(@À$ÓGÓHÐHr   )r   r&   r$   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r,   r3   r7   r@   rF   r_   rZ   ri   Ú__static_attributes__Ú__classdictcell__)r   s   @r   r   r   &   sb   ø‡ € ñ÷>.ð .÷*ð *÷ð ÷%ð %÷
ð ÷7ð 7÷.=ò =÷6I÷ Ið Ir   r   )ro   ÚreÚtypingr	   Úuritemplater   r   Úcompiler    r   r   r1   r   r   Ú<module>rv      s9   ðñó" 
Û å "Ý  à�jŠj˜Ó%€õ÷CIó CIr   