§
    ßŽ’jÞE  ã                  ó(  — U d dl mZ d dlZd dlZd dlZd dlZd dlZd dlmZm	Z	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 d dlZd dlZd dlZddlmZ ddlmZmZm Z m!Z! ddl"m#Z#m$Z$m%Z% dd	l&m'Z' dd
l(m)Z)m*Z*m+Z+m,Z, ddl-m.Z. ddl/m0Z0m1Z1 erddl"m2Z2 ddl3m4Z4  ed¦  «        Z5 ed¦  «        Z6 ed¦  «        Z7 edd¬¦  «        Z8 ej9        e:¦  «        Z;de<d<    G d„ dee6         ¦  «        Z= G d„ de>¦  «        Z?d%d„Z@d&d"„ZA G d#„ d$¦  «        ZBdS )'é    )ÚannotationsN)
ÚTYPE_CHECKINGÚAnyÚUnionÚGenericÚTypeVarÚCallableÚIteratorÚAsyncIteratorÚcastÚoverload)Ú	AwaitableÚ	ParamSpecÚoverrideÚ
deprecatedÚ
get_originé   )ÚNoneType)Úis_givenÚextract_type_argÚis_annotated_typeÚis_type_alias_type)Ú	BaseModelÚis_basemodelÚadd_request_id)ÚRAW_RESPONSE_HEADER)ÚStreamÚAsyncStreamÚis_stream_class_typeÚextract_stream_chunk_type)ÚAPIResponseValidationError)ÚJSONLDecoderÚAsyncJSONLDecoder)ÚFinalRequestOptions)Ú
BaseClientÚPÚRÚ_TÚ_T_coT)Ú	covariantzlogging.LoggerÚlogc                  óà  — e Zd ZU dZded<   ded<   ded<   ded	<   d
ed<   ded<   ded<   ded<   	 ddœd<d„Zed=d„¦   «         Zed>d"„¦   «         Z	ed?d$„¦   «         Z	d%d&œd@d)„Z	edAd+„¦   «         Z
edBd-„¦   «         ZedCd.„¦   «         ZedDd0„¦   «         ZedEd2„¦   «         ZedFd4„¦   «         ZedEd5„¦   «         ZedEd6„¦   «         ZedGd7„¦   «         ZedHd9„¦   «         Zd%d&œd@d:„ZedEd;„¦   «         Zd%S )IÚLegacyAPIResponsea°  This is a legacy class as it will be replaced by `APIResponse`
    and `AsyncAPIResponse` in the `_response.py` file in the next major
    release.

    For the sync client this will mostly be the same with the exception
    of `content` & `text` will be methods instead of properties. In the
    async client, all methods will be async.

    A migration script will be provided & the migration in general should
    be smooth.
    útype[R]Ú_cast_toúBaseClient[Any, Any]Ú_clientzdict[type[Any], Any]Ú_parsed_by_typeÚboolÚ_streamú1type[Stream[Any]] | type[AsyncStream[Any]] | NoneÚ_stream_clsr$   Ú_optionsúhttpx.ResponseÚhttp_responseÚintÚretries_takenr   )r;   ÚrawÚcast_toÚclientÚstreamÚ
stream_clsÚoptionsÚreturnÚNonec               óv   — || _         || _        i | _        || _        || _        || _        || _        || _        d S ©N)r/   r1   r2   r4   r6   r7   r9   r;   )Úselfr<   r=   r>   r?   r@   rA   r;   s           úHC:\Projects\DSCons\.venv\Lib\site-packages\anthropic\_legacy_response.pyÚ__init__zLegacyAPIResponse.__init__H   sF   € ð  ˆŒØˆŒØ!ˆÔØˆŒØ%ˆÔØˆŒØ ˆÔØ*ˆÔÐÐó    ú
str | Nonec                ó@   — | j         j                             d¦  «        S )Nz
request-id)r9   ÚheadersÚget©rF   s    rG   Ú
request_idzLegacyAPIResponse.request_id\   s   € àÔ!Ô)×-Ò-¨lÑ;Ô;Ð;rI   Útoútype[_T]r(   c               ó   — d S rE   © )rF   rP   s     rG   ÚparsezLegacyAPIResponse.parse`   s   € Ø,/¨CrI   r'   c                ó   — d S rE   rS   rN   s    rG   rT   zLegacyAPIResponse.parsec   s   € Ø˜#rI   N©rP   útype[_T] | NoneúR | _Tc               óx  — |�|n| j         }| j                             |¦  «        }|�|S |                      |¬¦  «        }t	          | j        j        ¦  «        r| j                             |¦  «        }t          |t          ¦  «        rt          || j
        ¦  «         || j        |<   t          t          |¦  «        S )aá  Returns the rich python representation of this response's data.

        NOTE: For the async client: this will become a coroutine in the next major version.

        For lower-level control, see `.read()`, `.json()`, `.iter_bytes()`.

        You can customise the type that the response is parsed into through
        the `to` argument, e.g.

        ```py
        from anthropic import BaseModel


        class MyModel(BaseModel):
            foo: str


        obj = response.parse(to=MyModel)
        print(obj.foo)
        ```

        We support parsing:
          - `BaseModel`
          - `dict`
          - `list`
          - `Union`
          - `str`
          - `int`
          - `float`
          - `httpx.Response`
        NrV   )r/   r2   rM   Ú_parser   r7   Úpost_parserÚ
isinstancer   r   rO   r   r'   )rF   rP   Ú	cache_keyÚcachedÚparseds        rG   rT   zLegacyAPIResponse.parsef   s±   € ð@ ˜.�B�B¨d¬mˆ	ØÔ%×)Ò)¨)Ñ4Ô4ˆØÐØˆMà—’ �Ñ#Ô#ˆÝ�D”MÔ-Ñ.Ô.ð 	7Ø”]×.Ò.¨vÑ6Ô6ˆFå�f�iÑ(Ô(ð 	4Ý˜6 4¤?Ñ3Ô3Ð3à*0ˆÔ˜YÑ'Ý•A�v‰ŒÐrI   úhttpx.Headersc                ó   — | j         j        S rE   )r9   rL   rN   s    rG   rL   zLegacyAPIResponse.headers•   ó   € àÔ!Ô)Ð)rI   úhttpx.Requestc                ó   — | j         j        S rE   )r9   ÚrequestrN   s    rG   Úhttp_requestzLegacyAPIResponse.http_request™   rb   rI   c                ó   — | j         j        S rE   )r9   Ústatus_coderN   s    rG   rh   zLegacyAPIResponse.status_code�   s   € àÔ!Ô-Ð-rI   ú	httpx.URLc                ó   — | j         j        S rE   )r9   ÚurlrN   s    rG   rk   zLegacyAPIResponse.url¡   s   € àÔ!Ô%Ð%rI   Ústrc                ó   — | j         j        S rE   )rf   ÚmethodrN   s    rG   rn   zLegacyAPIResponse.method¥   s   € àÔ Ô'Ð'rI   Úbytesc                ó   — | j         j        S )zŠReturn the binary response content.

        NOTE: this will be removed in favour of `.read()` in the
        next major version.
        )r9   ÚcontentrN   s    rG   rq   zLegacyAPIResponse.content©   s   € ð Ô!Ô)Ð)rI   c                ó   — | j         j        S )zyReturn the decoded response content.

        NOTE: this will be turned into a method in the next major version.
        )r9   ÚtextrN   s    rG   rs   zLegacyAPIResponse.text²   s   € ð Ô!Ô&Ð&rI   c                ó   — | j         j        S rE   )r9   Úhttp_versionrN   s    rG   ru   zLegacyAPIResponse.http_versionº   s   € àÔ!Ô.Ð.rI   c                ó   — | j         j        S rE   )r9   Ú	is_closedrN   s    rG   rw   zLegacyAPIResponse.is_closed¾   s   € àÔ!Ô+Ð+rI   údatetime.timedeltac                ó   — | j         j        S )zCThe time taken for the complete request/response cycle to complete.)r9   ÚelapsedrN   s    rG   rz   zLegacyAPIResponse.elapsedÂ   s   € ð Ô!Ô)Ð)rI   c               óö  — |�|n| j         }t          |¦  «        r|j        }|rt          |¦  «        rt	          |d¦  «        }t          |¦  «        p|}t          j        |¦  «        �rt          t          t          |¦  «        t          ¦  «        r[t          t           t          d|¦  «        | j                             d¬¦  «        t	          |d¦  «        | j        ¬¦  «        ¦  «        S t          t          t          |¦  «        t          ¦  «        r[t          t           t          d|¦  «        | j                             d¬¦  «        t	          |d¦  «        | j        ¬¦  «        ¦  «        S | j        �rX|r�t%          |¦  «        st'          dt(          › dt*          › �¦  «        ‚t          t,           |t/          |d	¬
¦  «        | j        t          t          | j        ¦  «        | j        ¬¦  «        ¦  «        S | j        r`t          t          |                      t/          | j        ¦  «        | j        t          t          | j        ¦  «        | j        ¬¦  «        ¦  «        S t          d| j        j        ¦  «        }|€t9          ¦   «         ‚t          t           ||| j        t          t          | j        ¦  «        | j        ¬¦  «        ¦  «        S |t:          u rt          t          d ¦  «        S | j        }|t<          k    rt          t          |j        ¦  «        S |t@          k    r't          t          tA          |j        ¦  «        ¦  «        S |tB          k    r't          t          tC          |j        ¦  «        ¦  «        S |tD          k    r0t          t          |j         #                    ¦   «         dk    ¦  «        S t          j        |¦  «        r3t          |tH          ¦  «        rt          t           ||¦  «        ¦  «        S |tJ          k    rtM          d¦  «        ‚t          j        |¦  «        rNt          |tN          j(        ¦  «        r4|tN          j(        k    rtS          d¦  «        ‚t          t          |¦  «        S t          j        |¦  «        r>t          |tT          ¦  «        s)t          |tV          j*        ¦  «        rt'          d¦  «        ‚|tX          ur€|tZ          urw|t\          urn|t^          uret          |tT          ¦  «        sPtM          d|› dtT          › dt\          › dtZ          › dt^          › dt:          › dt<          › dtN          j(        › d�¦  «        ‚|j0         1                    dd¦  «         2                    d¦  «        ^}}| 3                    d¦  «        s¯ti          |¦  «        rr	 | 5                    ¦   «         }| j         6                    |||¬¦  «        S # tn          $ r3}	tp           9                    dtu          |	¦  «        |	¦  «         Y d }	~	nd }	~	ww xY w| j        j;        rty          |d|› d�|j        ¬¦  «        ‚|j        S | 5                    ¦   «         }| j         6                    |||¬¦  «        S )Nr   ztype[JSONLDecoder[Any]]é@   ©Ú
chunk_size)Úraw_iteratorÚ	line_typer9   ztype[AsyncJSONLDecoder[Any]]z/Expected custom parse type to be a subclass of z or zUExpected custom stream type to be passed with a type argument, e.g. Stream[ChunkType])Úfailure_message)r=   Úresponser>   rA   r5   Útruez+Unexpected state - cast_to is `APIResponse`z:Subclasses of httpx.Response cannot be passed to `cast_to`zYPydantic models must subclass our base model type, e.g. `from anthropic import BaseModel`zUnsupported type, expected z to be a subclass of z, ú.zcontent-typeÚ*ú;Újson)Údatar=   r‚   z5Could not read JSON from response data due to %s - %szMExpected Content-Type response header to be `application/json` but received `z
` instead.)r‚   ÚmessageÚbody)=r/   r   Ú	__value__r   r   r   ÚinspectÚisclassÚ
issubclassr   r   r"   r'   r9   Ú
iter_bytesr#   Úaiter_bytesr4   r   Ú	TypeErrorr   r   r(   r    r1   r7   r6   Ú_default_stream_clsÚMissingStreamClassErrorr   rl   rs   r:   Úfloatr3   ÚlowerÚHttpxBinaryResponseContentr-   ÚRuntimeErrorÚhttpxÚResponseÚ
ValueErrorr   ÚpydanticÚobjectÚlistÚdictr   rL   rM   ÚsplitÚendswithr   r‡   Ú_process_response_dataÚ	Exceptionr+   ÚdebugÚtypeÚ_strict_response_validationr!   )
rF   rP   r=   Úoriginr@   r‚   Úcontent_typeÚ_rˆ   Úexcs
             rG   rZ   zLegacyAPIResponse._parseÇ   sð  € Ø˜�"�"¨D¬Mˆõ ˜gÑ&Ô&ð 	(ØÔ'ˆGð ð 	3Õ(¨Ñ1Ô1ð 	3Ý& w°Ñ2Ô2ˆGå˜GÑ$Ô$Ð/¨ˆåŒ?˜6Ñ"Ô"ñ 	Ý�$�s FÑ+Ô+­\Ñ:Ô:ð ÝÝØ<•DÐ2°GÑ<Ô<Ø%)Ô%7×%BÒ%BÈbÐ%BÑ%QÔ%QÝ"2°7¸AÑ">Ô">Ø&*Ô&8ðñ ô ñô ð õ �$�s FÑ+Ô+Õ->Ñ?Ô?ð ÝÝØA•DÐ7¸ÑAÔAØ%)Ô%7×%CÒ%CÈrÐ%CÑ%RÔ%RÝ"2°7¸AÑ">Ô">Ø&*Ô&8ðñ ô ñô ð ð Œ<ñ )	Øð Ý+¨BÑ/Ô/ð qÝ#Ð$oÕV\Ð$oÐ$oÕbmÐ$oÐ$oÑpÔpÐpåÝØ�BÝ 9Øð -Dð!ñ !ô !ð "&Ô!3Ý#¥C¨¬Ñ6Ô6Ø $¤ðñ ô ñô ð ð Ôð 	ÝÝØ×$Ò$Ý 9¸$Ô:JÑ KÔ KØ!%Ô!3Ý#¥C¨¬Ñ6Ô6Ø $¤ð	 %ñ ô ñô ð õ ÐQÐSWÔS_ÔSsÑtÔtˆJØÐ!Ý-Ñ/Ô/Ð/åÝØ�
Ø#Ø!Ô/Ý¥ T¤\Ñ2Ô2Ø œMð	ñ ô ñô ð ð •hÐÐÝ�˜4‘=”=Ð àÔ%ˆØ•cŠ>ˆ>Ý�˜8œ=Ñ)Ô)Ð)à•cŠ>ˆ>Ý��3˜xœ}Ñ-Ô-Ñ.Ô.Ð.à•eÒÐÝ��5 ¤Ñ/Ô/Ñ0Ô0Ð0à•dŠ?ˆ?Ý�˜8œ=×.Ò.Ñ0Ô0°FÒ:Ñ;Ô;Ð;åŒ?˜6Ñ"Ô"ð 	.¥z°&Õ:TÑ'UÔ'Uð 	.Ý�˜7˜7 8Ñ,Ô,Ñ-Ô-Ð-àÕ&Ò&Ð&ÝÐLÑMÔMÐMåŒ?Øñ
ô 
ð 
	%å˜¥¤Ñ0Ô0ð
	%ð �%œ.Ò(Ð(Ý Ð!^Ñ_Ô_Ð_Ý�˜8Ñ$Ô$Ð$õ ŒOØñô ð	yõ ˜v¥yÑ1Ô1ð		yõ
 ˜6¥8Ô#5Ñ6Ô6ð	yõ ÐwÑxÔxÐxð �6Ð!Ð!Ø�d�N�NØ�d�N�NØ�e�O�OÝ˜v¥yÑ1Ô1ð $õ ð Y¨gð  Yð  YÍIð  Yð  YÕY]ð  Yð  YÕaeð  Yð  YÕinð  Yð  YÕrzð  Yð  Yõ  Bð  Yð  Yõ  HMô  HVð  Yð  Yð  Yñô ð ð $Ô+×/Ò/°ÀÑDÔD×JÒJÈ3ÑOÔOÐˆ�qØ×$Ò$ VÑ,Ô,ð 	!Ý˜GÑ$Ô$ð 
ð	Ø#Ÿ=š=™?œ?�Dð  œ<×>Ò>Ø!Ø 'Ø!)ð ?ñ ô ð øõ !ð gð gð gÝ—I’IÐUÕW[Ð\_ÑW`ÔW`ÐbeÑfÔfÐfÐfÐfÐfÐfÐføøøøðgøøøð Œ|Ô7ð Ý0Ø%ð EÐlxð  Eð  Eð  EØ!œðñ ô ð ð ”=Ð à�}Š}‰ŒˆàŒ|×2Ò2ØØØð 3ñ 
ô 
ð 	
s   Ö+W ×
X×&)XØXc                óB   — d| j         › d| j        j        › d| j        › d�S )Nz<APIResponse [ú z] type=ú>)rh   r9   Úreason_phraser/   rN   s    rG   Ú__repr__zLegacyAPIResponse.__repr__n  s0   € àl Ô 0ÐlÐl°4Ô3EÔ3SÐlÐlÐ\`Ô\iÐlÐlÐlÐlrI   )r<   r8   r=   r.   r>   r0   r?   r3   r@   r5   rA   r$   r;   r:   rB   rC   ©rB   rJ   )rP   rQ   rB   r(   )rB   r'   )rP   rW   rB   rX   )rB   r`   )rB   rc   )rB   r:   )rB   ri   ©rB   rl   ©rB   ro   )rB   r3   )rB   rx   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__Ú__annotations__rH   ÚpropertyrO   r   rT   rL   rf   rh   rk   rn   rq   rs   ru   rw   rz   rZ   r   r®   rS   rI   rG   r-   r-   /   s¥  € € € € € € ð
ð 
ð ÐÐÑØ!Ð!Ð!Ñ!Ø)Ð)Ð)Ñ)Ø€M€M�MØBÐBÐBÑBØ!Ð!Ð!Ñ!à!Ð!Ð!Ñ!àÐÐÑØMð ð+ð +ð +ð +ð +ð +ð( ð<ð <ð <ñ „Xð<ð Ø/Ð/Ð/ñ „XØ/àØÐÐñ „XØà-1ð -ð -ð -ð -ð -ð -ð^ ð*ð *ð *ñ „Xð*ð ð*ð *ð *ñ „Xð*ð ð.ð .ð .ñ „Xð.ð ð&ð &ð &ñ „Xð&ð ð(ð (ð (ñ „Xð(ð ð*ð *ð *ñ „Xð*ð ð'ð 'ð 'ñ „Xð'ð ð/ð /ð /ñ „Xð/ð ð,ð ,ð ,ñ „Xð,ð ð*ð *ð *ñ „Xð*ð /3ð e
ð e
ð e
ð e
ð e
ð e
ðN ðmð mð mñ „Xðmð mð mrI   r-   c                  ó    ‡ — e Zd Zdˆ fd„Zˆ xZS )r“   rB   rC   c                óJ   •— t          ¦   «                              d¦  «         d S )Nz}The `stream` argument was set to `True` but the `stream_cls` argument was not given. See `anthropic._streaming` for reference)ÚsuperrH   )rF   Ú	__class__s    €rG   rH   z MissingStreamClassError.__init__t  s/   ø€ Ý‰Œ×Òð Lñ	
ô 	
ð 	
ð 	
ð 	
rI   ©rB   rC   )r²   r³   r´   rH   Ú__classcell__)r»   s   @rG   r“   r“   s  s=   ø€ € € € € ð
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
ð 
rI   r“   ÚfuncúCallable[P, R]rB   ú!Callable[P, LegacyAPIResponse[R]]c                óH   ‡ — t          j        ‰ ¦  «        dˆ fd„¦   «         }|S )	ú�Higher order function that takes one of our bound API methods and wraps it
    to support returning the raw `APIResponse` object directly.
    ÚargsúP.argsÚkwargsúP.kwargsrB   úLegacyAPIResponse[R]c                 óÆ   •— i t          t          |                     d¦  «        ¦  «        pi ¥}d|t          <   ||d<   t          t          t
                    ‰| i |¤Ž¦  «        S ©NÚextra_headersrƒ   ©r   r   rM   r   r-   r'   ©rÃ   rÅ   rÊ   r¾   s      €rG   Úwrappedz(to_raw_response_wrapper.<locals>.wrapped  sc   ø€ à(Z­Dµ°f·j²jÀÑ6QÔ6QÑ,RÔ,RÐ,XÐVXÐ(ZˆØ-3ˆÕ)Ñ*à"/ˆˆÑåÕ%¥aÔ(¨$¨$°Ð*?¸Ð*?Ð*?Ñ@Ô@Ð@rI   ©rÃ   rÄ   rÅ   rÆ   rB   rÇ   ©Ú	functoolsÚwraps©r¾   rÍ   s   ` rG   Úto_raw_response_wrapperrÓ   z  sE   ø€ õ
 „_�TÑÔðAð Að Að Að Añ ÔðAð €NrI   úCallable[P, Awaitable[R]]ú,Callable[P, Awaitable[LegacyAPIResponse[R]]]c                óH   ‡ — t          j        ‰ ¦  «        dˆ fd„¦   «         }|S )	rÂ   rÃ   rÄ   rÅ   rÆ   rB   rÇ   c               Ÿ  óÖ   •K  — i t          t          |                     d¦  «        ¦  «        pi ¥}d|t          <   ||d<   t          t          t
                    ‰| i |¤Žƒ d {V —†¦  «        S rÉ   rË   rÌ   s      €rG   rÍ   z.async_to_raw_response_wrapper.<locals>.wrapped�  sy   øè è € à(Z­Dµ°f·j²jÀÑ6QÔ6QÑ,RÔ,RÐ,XÐVXÐ(ZˆØ-3ˆÕ)Ñ*à"/ˆˆÑåÕ%¥aÔ(°°°dÐ0E¸fÐ0EÐ0EÐ*EÐ*EÐ*EÐ*EÐ*EÐ*EÑFÔFÐFrI   rÎ   rÏ   rÒ   s   ` rG   Úasync_to_raw_response_wrapperrØ   ‹  sE   ø€ õ
 „_�TÑÔðGð Gð Gð Gð Gñ ÔðGð €NrI   c                  ó^  — e Zd ZU ded<   d*d„Zed+d„¦   «         Zed,d	„¦   «         Zed-d„¦   «         Zed-d„¦   «         Z	d.d„Z
d+d„Zd/d0d„Zd/d1d„Zd2d„Zd/d0d„Zd3d„Z ed¦  «        ddœd4d„¦   «         Zd5d „Zd+d!„Zd/d6d#„Zd/d7d%„Zd8d&„Zd/d6d'„Z ed¦  «        ddœd4d(„¦   «         Zd5d)„ZdS )9r–   r8   r‚   rB   rC   c                ó   — || _         d S rE   )r‚   )rF   r‚   s     rG   rH   z#HttpxBinaryResponseContent.__init__Ÿ  s   € Ø ˆŒˆˆrI   ro   c                ó   — | j         j        S rE   )r‚   rq   rN   s    rG   rq   z"HttpxBinaryResponseContent.content¢  s   € àŒ}Ô$Ð$rI   rl   c                ó   — | j         j        S rE   )r‚   rs   rN   s    rG   rs   zHttpxBinaryResponseContent.text¦  s   € àŒ}Ô!Ð!rI   rJ   c                ó   — | j         j        S rE   )r‚   ÚencodingrN   s    rG   rÞ   z#HttpxBinaryResponseContent.encodingª  s   € àŒ}Ô%Ð%rI   c                ó   — | j         j        S rE   )r‚   Úcharset_encodingrN   s    rG   rà   z+HttpxBinaryResponseContent.charset_encoding®  s   € àŒ}Ô-Ð-rI   rÅ   r   c                ó&   —  | j         j        di |¤ŽS )NrS   )r‚   r‡   )rF   rÅ   s     rG   r‡   zHttpxBinaryResponseContent.json²  s   € Ø!ˆtŒ}Ô!Ð+Ð+ FÐ+Ð+Ð+rI   c                ó4   — | j                              ¦   «         S rE   )r‚   ÚreadrN   s    rG   rã   zHttpxBinaryResponseContent.readµ  s   € ØŒ}×!Ò!Ñ#Ô#Ð#rI   Nr~   ú
int | NoneúIterator[bytes]c                ó6   — | j                              |¦  «        S rE   )r‚   r�   ©rF   r~   s     rG   r�   z%HttpxBinaryResponseContent.iter_bytes¸  s   € ØŒ}×'Ò'¨
Ñ3Ô3Ð3rI   úIterator[str]c                ó6   — | j                              |¦  «        S rE   )r‚   Ú	iter_textrç   s     rG   rê   z$HttpxBinaryResponseContent.iter_text»  s   € ØŒ}×&Ò& zÑ2Ô2Ð2rI   c                ó4   — | j                              ¦   «         S rE   )r‚   Ú
iter_linesrN   s    rG   rì   z%HttpxBinaryResponseContent.iter_lines¾  s   € ØŒ}×'Ò'Ñ)Ô)Ð)rI   c                ó6   — | j                              |¦  «        S rE   )r‚   Úiter_rawrç   s     rG   rî   z#HttpxBinaryResponseContent.iter_rawÁ  s   € ØŒ}×%Ò% jÑ1Ô1Ð1rI   Úfileústr | os.PathLike[str]c                ó¾   — t          |d¬¦  «        5 }| j                             ¦   «         D ]}|                     |¦  «         Œ	 ddd¦  «         dS # 1 swxY w Y   dS )av  Write the output to the given file.

        Accepts a filename or any path-like object, e.g. pathlib.Path

        Note: if you want to stream the data to the file instead of writing
        all at once then you should use `.with_streaming_response` when making
        the API request, e.g. `client.with_streaming_response.foo().stream_to_file('my_filename.txt')`
        Úwb©ÚmodeN©Úopenr‚   r�   Úwrite)rF   rï   Úfrˆ   s       rG   Úwrite_to_filez(HttpxBinaryResponseContent.write_to_fileÄ  s«   € õ �$˜TÐ"Ñ"Ô"ð 	 aØœ×0Ò0Ñ2Ô2ð ð �Ø—’˜‘”��ðð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ’2AÁAÁAz‚Due to a bug, this method doesn't actually stream the response content, `.with_streaming_response.method()` should be used insteadr}   c               óÀ   — t          |d¬¦  «        5 }| j                             |¦  «        D ]}|                     |¦  «         Œ	 d d d ¦  «         d S # 1 swxY w Y   d S ©Nrò   ró   rõ   )rF   rï   r~   rø   rˆ   s        rG   Ústream_to_filez)HttpxBinaryResponseContent.stream_to_fileÔ  s­   € õ �$˜TÐ"Ñ"Ô"ð 	 aØœ×0Ò0°Ñ<Ô<ð ð �Ø—’˜‘”��ðð	ð 	ð 	ñ 	ô 	ð 	ð 	ð 	ð 	ð 	ð 	ð 	øøøð 	ð 	ð 	ð 	ð 	ð 	s   ’3AÁAÁAc                ó4   — | j                              ¦   «         S rE   )r‚   ÚcloserN   s    rG   rþ   z HttpxBinaryResponseContent.closeá  s   € ØŒ}×"Ò"Ñ$Ô$Ð$rI   c              ƒ  óD   K  — | j                              ¦   «         ƒ d {V —†S rE   )r‚   ÚareadrN   s    rG   r   z HttpxBinaryResponseContent.areadä  s,   è è € Ø”]×(Ò(Ñ*Ô*Ð*Ð*Ð*Ð*Ð*Ð*Ð*rI   úAsyncIterator[bytes]c              ƒ  ó:   K  — | j                              |¦  «        S rE   )r‚   r�   rç   s     rG   r�   z&HttpxBinaryResponseContent.aiter_bytesç  s   è è € ØŒ}×(Ò(¨Ñ4Ô4Ð4rI   úAsyncIterator[str]c              ƒ  ó:   K  — | j                              |¦  «        S rE   )r‚   Ú
aiter_textrç   s     rG   r  z%HttpxBinaryResponseContent.aiter_textê  s   è è € ØŒ}×'Ò'¨
Ñ3Ô3Ð3rI   c              ƒ  ó8   K  — | j                              ¦   «         S rE   )r‚   Úaiter_linesrN   s    rG   r  z&HttpxBinaryResponseContent.aiter_linesí  s   è è € ØŒ}×(Ò(Ñ*Ô*Ð*rI   c              ƒ  ó:   K  — | j                              |¦  «        S rE   )r‚   Ú	aiter_rawrç   s     rG   r	  z$HttpxBinaryResponseContent.aiter_rawð  s   è è € ØŒ}×&Ò& zÑ2Ô2Ð2rI   c             ƒ  ó>  K  — t          j        |¦  «        }|                     d¬¦  «        ƒ d {V —†4 ƒd {V —†}| j                             |¦  «        2 3 d {V —†}|                     |¦  «        ƒ d {V —† Œ#6 	 d d d ¦  «        ƒd {V —† d S # 1 ƒd {V —†swxY w Y   d S rû   )ÚanyioÚPathrö   r‚   r�   r÷   )rF   rï   r~   Úpathrø   rˆ   s         rG   Úastream_to_filez*HttpxBinaryResponseContent.astream_to_fileó  s^  è è € õ Œz˜$ÑÔˆØŸš¨˜Ñ-Ô-Ð-Ð-Ð-Ð-Ð-Ð-ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$°Ø"œm×7Ò7¸
ÑCÔCð $ð $ð $ð $ð $ð $ð $�dØ—g’g˜d‘m”mÐ#Ð#Ð#Ð#Ð#Ð#Ð#Ð#ð DÐCð	$ð 	$ð 	$ñ 	$ô 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$ð 	$øøøð 	$ð 	$ð 	$ð 	$ð 	$ð 	$s   ¹BÁA7ÁBÂ
BÂBc              ƒ  óD   K  — | j                              ¦   «         ƒ d {V —†S rE   )r‚   ÚacloserN   s    rG   r  z!HttpxBinaryResponseContent.aclose  s,   è è € Ø”]×)Ò)Ñ+Ô+Ð+Ð+Ð+Ð+Ð+Ð+Ð+rI   )r‚   r8   rB   rC   r±   r°   r¯   )rÅ   r   rB   r   rE   )r~   rä   rB   rå   )r~   rä   rB   rè   )rB   rè   )rï   rð   rB   rC   )rï   rð   r~   rä   rB   rC   r¼   )r~   rä   rB   r  )r~   rä   rB   r  )rB   r  )r²   r³   r´   r¶   rH   r·   rq   rs   rÞ   rà   r‡   rã   r�   rê   rì   rî   rù   r   rü   rþ   r   r�   r  r  r	  r  r  rS   rI   rG   r–   r–   œ  st  € € € € € € ØÐÐÑð!ð !ð !ð !ð ð%ð %ð %ñ „Xð%ð ð"ð "ð "ñ „Xð"ð ð&ð &ð &ñ „Xð&ð ð.ð .ð .ñ „Xð.ð,ð ,ð ,ð ,ð$ð $ð $ð $ð4ð 4ð 4ð 4ð 4ð3ð 3ð 3ð 3ð 3ð*ð *ð *ð *ð2ð 2ð 2ð 2ð 2ðð ð ð ð  €Zð 	Mñô ð "&ð	ð ð ð ð ñô ðð%ð %ð %ð %ð+ð +ð +ð +ð5ð 5ð 5ð 5ð 5ð4ð 4ð 4ð 4ð 4ð+ð +ð +ð +ð3ð 3ð 3ð 3ð 3ð €Zð 	Mñô ð "&ð		$ð 	$ð 	$ð 	$ð 	$ñô ð	$ð,ð ,ð ,ð ,ð ,ð ,rI   r–   )r¾   r¿   rB   rÀ   )r¾   rÔ   rB   rÕ   )CÚ
__future__r   ÚosrŒ   ÚloggingÚdatetimerÐ   Útypingr   r   r   r   r   r	   r
   r   r   r   Útyping_extensionsr   r   r   r   r   r  r˜   r›   Ú_typesr   Ú_utilsr   r   r   r   Ú_modelsr   r   r   Ú
_constantsr   Ú
_streamingr   r   r   r    Ú_exceptionsr!   Ú_decoders.jsonlr"   r#   r$   Ú_base_clientr%   r&   r'   r(   r)   Ú	getLoggerr²   r+   r¶   r-   r‘   r“   rÓ   rØ   r–   rS   rI   rG   ú<module>r      s  ðØ "Ð "Ð "Ð "Ð "Ð "Ð "à 	€	€	€	Ø €€€Ø €€€Ø €€€Ø Ð Ð Ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð UÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ TÐ Tà €€€Ø €€€Ø €€€à Ð Ð Ð Ð Ð Ø UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UÐ UØ <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ø +Ð +Ð +Ð +Ð +Ð +Ø \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ð \Ø 3Ð 3Ð 3Ð 3Ð 3Ð 3Ø <Ð <Ð <Ð <Ð <Ð <Ð <Ð <àð )Ø,Ð,Ð,Ð,Ð,Ð,Ø(Ð(Ð(Ð(Ð(Ð(ð €Iˆc�N„N€Ø€GˆC�L„L€Ø€WˆT�]„]€Øˆ� 4Ð(Ñ(Ô(€à'�gÔ'¨Ñ1Ô1€Ð 1Ð 1Ð 1Ñ 1ðAmð Amð Amð Amð Am˜ œ
ñ Amô Amð AmðH

ð 
ð 
ð 
ð 
˜iñ 
ô 
ð 
ðð ð ð ð"ð ð ð ð"f,ð f,ð f,ð f,ð f,ñ f,ô f,ð f,ð f,ð f,rI   