Mini Kabibi Habibi

Current Path : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/http/__pycache__/
Upload File :
Current File : C:/Users/ITO/AppData/Local/Programs/Python/Python314/Lib/http/__pycache__/cookies.cpython-314.pyc

+
��h�P��^�Rt^RIt^RIt^RIt.R OtRP
tRP
tRP
t!RR]	4t
]P]P,R	,t
]
R
,t]!]!R44]!]!]]44,
Uu/uF
pVRV,bK	upt]P)]!R
4R]!R4R/4]P*!R]P,!]
4,4P.tRt]P*!R4P4tRtRt.R!Ot.R"Ot^]]3Rlt !RR]!4t"Rt#]#R,t$]P*!R]#,R,]$,R,]PJ]PL,4t'!RR]!4t(!RR](4t)R#uupi)#a.

Here's a sample session to show how to use this module.
At the moment, this is the only documentation.

The Basics
----------

Importing is easy...

   >>> from http import cookies

Most of the time you start by creating a cookie.

   >>> C = cookies.SimpleCookie()

Once you've created your Cookie, you can add values just as if it were
a dictionary.

   >>> C = cookies.SimpleCookie()
   >>> C["fig"] = "newton"
   >>> C["sugar"] = "wafer"
   >>> C.output()
   'Set-Cookie: fig=newton\r\nSet-Cookie: sugar=wafer'

Notice that the printable representation of a Cookie is the
appropriate format for a Set-Cookie: header.  This is the
default behavior.  You can change the header and printed
attributes by using the .output() function

   >>> C = cookies.SimpleCookie()
   >>> C["rocky"] = "road"
   >>> C["rocky"]["path"] = "/cookie"
   >>> print(C.output(header="Cookie:"))
   Cookie: rocky=road; Path=/cookie
   >>> print(C.output(attrs=[], header="Cookie:"))
   Cookie: rocky=road

The load() method of a Cookie extracts cookies from a string.  In a
CGI script, you would use this method to extract the cookies from the
HTTP_COOKIE environment variable.

   >>> C = cookies.SimpleCookie()
   >>> C.load("chips=ahoy; vienna=finger")
   >>> C.output()
   'Set-Cookie: chips=ahoy\r\nSet-Cookie: vienna=finger'

The load() method is darn-tootin smart about identifying cookies
within a string.  Escaped quotation marks, nested semicolons, and other
such trickeries do not confuse it.

   >>> C = cookies.SimpleCookie()
   >>> C.load('keebler="E=everybody; L=\\"Loves\\"; fudge=\\012;";')
   >>> print(C)
   Set-Cookie: keebler="E=everybody; L=\"Loves\"; fudge=\012;"

Each element of the Cookie also supports all of the RFC 2109
Cookie attributes.  Here's an example which sets the Path
attribute.

   >>> C = cookies.SimpleCookie()
   >>> C["oreo"] = "doublestuff"
   >>> C["oreo"]["path"] = "/"
   >>> print(C)
   Set-Cookie: oreo=doublestuff; Path=/

Each dictionary element has a 'value' attribute, which gives you
back the value associated with the key.

   >>> C = cookies.SimpleCookie()
   >>> C["twix"] = "none for you"
   >>> C["twix"].value
   'none for you'

The SimpleCookie expects that all values should be standard strings.
Just to be sure, SimpleCookie invokes the str() builtin to convert
the value to a string, when the values are set dictionary-style.

   >>> C = cookies.SimpleCookie()
   >>> C["number"] = 7
   >>> C["string"] = "seven"
   >>> C["number"].value
   '7'
   >>> C["string"].value
   'seven'
   >>> C.output()
   'Set-Cookie: number=7\r\nSet-Cookie: string=seven'

Finis.
N�CookieError�
BaseCookie�SimpleCookie�z; � c��]tRt^�tRtR#)r�N)�__name__�
__module__�__qualname__�__firstlineno__�__static_attributes__r��HC:\Users\ITO\AppData\Local\Programs\Python\Python314\Lib\http\cookies.pyrr�s��rz!#$%&'*+-.^_`|~:z
 ()/<=>?@[]{}�z\%03o�"�\"�\z\\z[%s]+c�v�Ve\V4'dV#RVP\4,R,#)z�Quote a string for use in a cookie header.

If the string does not need to be double-quoted, then just return the
string.  Otherwise, surround the string in doublequotes and quote
(with a \) special characters.
r)�
_is_legal_key�	translate�_Translator��strs&r�_quoter�s1���{�m�C�(�(��
��S�]�]�;�/�/�#�5�5rz\\(?:([0-3][0-7][0-7])|(.))c�j�V^,'d\\V^,^44#V^,#)�)�chr�int)�ms&r�_unquote_replacer �s)����t�t��3�q��t�Q�<� � ���t�rc��Ve\V4^8dV#V^,R8wgVR,R8wdV#V^Rp\\V4#)Nr���)�len�_unquote_subr rs&r�_unquoter%�sO���{�c�#�h��l��
�
�1�v��}��B��3���
��a��)�C��(�#�.�.rc	�|�^RIHpHpV!4pV!WP,4w	rgr�r�r�pRW,W�V,WiW�3,#)�)�gmtime�timez#%s, %02d %3s %4d %02d:%02d:%02d GMT)r)r()�future�weekdayname�	monthnamer(r)�now�year�month�day�hh�mm�ss�wd�y�zs&&&            r�_getdater7�sE��!�
�&�C�-3�C�L�-A�*�D��"�"��0��O�S�E�"2�D�b�E�F�Frc�Pa�]tRt^�toRtRRRRRRRRR	R
RRR
RRRRRRR/
t]P]R4t0R)mt	Rt
]R4t]R4t
]R4tRtR*RltRt]P&tRtRtR tR!tR"tR#tR+R$lt]tR%tR*R&ltR*R'lt]!] PB4t"R(t#Vt$R#),�Morsela/A class to hold ONE (key, value) pair.

In a cookie, each such pair may have several attributes, so this class is
used to keep the attributes associated with the appropriate key,value pair.
This class also includes a coded_value attribute, which is used to hold
the network representation of the value.
�expires�path�Path�comment�Comment�domain�Domain�max-agezMax-Age�secure�Secure�httponly�HttpOnly�version�Version�samesite�SameSite�partitioned�Partitionedrc�n�R;Vn;VnVn\P	WP
4R#�N)�_key�_value�_coded_value�dict�update�_reserved_defaults��selfs&r�__init__�Morsel.__init__s,��6:�:��	�:�D�K�$�"3�	
���D�1�1�2rc��VP#rM)rNrTs&r�key�
Morsel.keys���y�y�rc��VP#rM)rOrTs&r�value�Morsel.values���{�{�rc��VP#rM)rPrTs&r�coded_value�Morsel.coded_value!s��� � � rc��VP4pWP9g\RV:24h\P	WV4R#��Invalid attribute N)�lower�	_reservedrrQ�__setitem__)rU�K�Vs&&&rrf�Morsel.__setitem__%s5��
�G�G�I���N�N�"���;�<�<�����!�$rNc��VP4pWP9d\RV:24h\P	WV4#)rc)rdrerrQ�
setdefault)rUrY�vals&&&rrk�Morsel.setdefault+s6���i�i�k���n�n�$���=�>�>����t�#�.�.rc�*�\V\4'g\#\P	W4;'d\VP
VP
8H;'d;VPVP8H;'dVPVP8H#rM)�
isinstancer9�NotImplementedrQ�__eq__rOrNrP�rU�morsels&&rrq�
Morsel.__eq__1sz���&�&�)�)�!�!����D�)�9�9����v�}�}�,�9�9��	�	�V�[�[�(�9�9��!�!�V�%8�%8�8�	:rc��\4p\PW4VPPVP4V#rM)r9rQrR�__dict__rrs& r�copy�Morsel.copy;s0��������F�!������t�}�}�-��
rc���/p\V4P4F8wr4VP4pW0P9d\	RV:24hWBV&K:	\PW4R#rb)rQ�itemsrdrerrR)rU�values�datarYrls&&   rrR�
Morsel.updateAsX�����V��*�*�,�H�C��)�)�+�C��.�.�(�!�C�"A�B�B���I�	-�
	
���D�rc�<�VP4VP9#rM)rdre)rUrgs&&r�
isReservedKey�Morsel.isReservedKeyJs���w�w�y�D�N�N�*�*rc���VP4VP9d\RV:24h\V4'g\RV:24hWnW nW0nR#)zAttempt to set a reserved key zIllegal key N)rdrerrrNrOrP)rUrYrl�	coded_vals&&&&r�set�
Morsel.setMsM���9�9�;�$�.�.�(��C�I�J�J��S�!�!��#�7�8�8��	���%�rc�N�RVPRVPRVP/#)rYr\r_�rNrOrPrTs&r�__getstate__�Morsel.__getstate__Xs)���4�9�9��T�[�[��4�,�,�
�	
rc�Z�VR,VnVR,VnVR,VnR#)rYr\r_Nr�)rU�states&&r�__setstate__�Morsel.__setstate___s%���%�L��	��G�n���!�-�0��rc�2�V:RVPV4:2#)r)�OutputString)rU�attrs�headers&&&r�output�
Morsel.outputds�� �$�"3�"3�E�":�;�;rc�\�RVPP:RVP4:R2#)�<�: �>)�	__class__r	r�rTs&r�__repr__�Morsel.__repr__is ��!�^�^�4�4�d�6G�6G�6I�J�Jrc�R�RVPV4PRR4,#)z�
        <script type="text/javascript">
        <!-- begin hiding
        document.cookie = "%s";
        // end hiding -->
        </script>
        rr)r��replace)rUr�s&&r�	js_output�Morsel.js_outputls.���� � ��'�/�/��U�;�
=�	=rc�j�.pVPpV!VP:RVP:24Vf
VPp\	VP44pVEFHwrVVR8XdKWQ9dKVR8XdB\
V\4'd,V!VPV,:R\V4:24K_VR8Xd;\
V\4'd%V!RVPV,V3,4K�VR8XdB\
V\4'd,V!VPV,:R\V4:24K�WPP9d1V'd&V!\VPV,44EK%EK(V!VPV,:RV:24EKK	\V4#)�=rr:rAz%s=%dr=)
�appendrYr_re�sortedrzrorr7rr�_flags�_semispacejoin)rUr��resultr�rzrYr\s&&     rr��Morsel.OutputStringvsK��������	�$�(�(�D�$4�$4�5�6��=��N�N�E��t�z�z�|�$���J�C���{������i��J�u�c�$:�$:��$�.�.��"5�"5�x���G�H��	�!�j���&<�&<��w�$�.�.��"5�u�!=�=�>��	�!�j���&<�&<��$�.�.��"5�"5�v�e�}�E�F����#���3�t�~�~�c�2�3�4���$�.�.��"5�"5�u�=�>� �$�f�%�%r)rPrNrO>rBrDrJrM)N�Set-Cookie:)%r	r
rr�__doc__rerQ�fromkeysrSr�rV�propertyrYr\r_rfrkrq�object�__ne__rwrRrr�r�r�r��__str__r�r�r��classmethod�types�GenericAlias�__class_getitem__r
�__classdictcell__��
__classdict__s@rr9r9�s�����*	�Y��V��Y��X��Y��X��Z��Y��Z��}��I����y�"�5��
2�F�3����������!��!�%�/�:��]�]�F�� �+�	&�
�1�
<��G�K�=�&�B$�E�$6�$6�7�rr9z,\w\d!#%&'~_`><@,:/\$\*\+\-\.\^\|\)\(\?\}\{\=z\[\]z�
    \s*                            # Optional whitespace at start of cookie
    (?P<key>                       # Start of group 'key'
    [ax]+?   # Any word of at least one letter
    )                              # End of group 'key'
    (                              # Optional group: there may not be a value.
    \s*=\s*                          # Equal Sign
    (?P<val>                         # Start of group 'val'
    "(?:[^\\"]|\\.)*"                  # Any double-quoted string
    |                                  # or
    # Special case for "expires" attr
    (\w{3,6}day|\w{3}),\s              # Day of the week or abbreviated day
    [\w\d\s-]{9,11}\s[\d:]{8}\sGMT     # Date and time in specific format
    |                                  # or
    [a-]*      # Any word or empty string
    )                                # End of group 'val'
    )?                             # End of optional value group
    \s*                            # Any number of spaces.
    (\s+|;|$)                      # Ending either at space, semicolon, or EOS.
    c�va�]tRtRtoRtRtRtRRltRtRt	RR	lt
]
tR
tRRlt
Rt]3R
ltRtVtR#)ri�z'A container class for a set of Morsels.c��W3#)z�real_value, coded_value = value_decode(STRING)
Called prior to setting a cookie's value from the network
representation.  The VALUE is the value read from HTTP
header.
Override this function to modify the behavior of cookies.
r�rUrls&&r�value_decode�BaseCookie.value_decode�s���x�rc��\V4pW"3#)z�real_value, coded_value = value_encode(VALUE)
Called prior to setting a cookie's value from the dictionary
representation.  The VALUE is the value being assigned.
Override this function to modify the behavior of cookies.
r�rUrl�strvals&& r�value_encode�BaseCookie.value_encode�s���S����~�rNc�<�V'dVPV4R#R#rM)�load)rU�inputs&&rrV�BaseCookie.__init__�s����I�I�e��rc��VPV\44pVPWV4\P	WV4R#)z+Private method for setting a cookie's valueN)�getr9r�rQrf)rUrY�
real_valuer_�Ms&&&& r�__set�BaseCookie.__set�s2���H�H�S�&�(�#��	���c�{�+�����A�&rc��\V\4'd\PWV4R#VP	V4wr4VPWV4R#)zDictionary style assignment.N)ror9rQrfr��_BaseCookie__set)rUrYr\�rval�cvals&&&  rrf�BaseCookie.__setitem__�s?���e�V�$�$����T��.��*�*�5�1�J�D��J�J�s�$�'rc��.p\VP44pVF%wrgVPVPW44K'	VP	V4#)z"Return a string suitable for HTTP.)r�rzr�r��join)rUr�r��sepr�rzrYr\s&&&&    rr��BaseCookie.output�sG�����t�z�z�|�$���J�C��M�M�%�,�,�u�5�6� ��x�x���rc���.p\VP44pVF0wr4VPV:R\VP4:24K2	RVP
P:R\V4:R2#)r�r�r�r�)r�rzr��reprr\r�r	�
_spacejoin)rU�lrzrYr\s&    rr��BaseCookie.__repr__�sV�����t�z�z�|�$���J�C�
�H�H��T�%�+�+�%6�7�8� �!�^�^�4�4�j��m�D�Drc��.p\VP44pVF%wrEVPVPV44K'	\	V4#)z(Return a string suitable for JavaScript.)r�rzr�r��	_nulljoin)rUr�r�rzrYr\s&&    rr��BaseCookie.js_output�sC�����t�z�z�|�$���J�C��M�M�%�/�/�%�0�1� ��� � rc��\V\4'dVPV4R#VP4F	wr#W0V&K	R#)z�Load cookies from a string (presumably HTTP_COOKIE) or
from a dictionary.  Loading cookies from a dictionary 'd'
is equivalent to calling:
    map(Cookie.__setitem__, d.keys(), d.values())
N)ror�_BaseCookie__parse_stringrz)rU�rawdatarYr\s&&  rr��BaseCookie.load�sB���g�s�#�#�����(�
	�&�m�m�o�
��!�S�	�.�rc�T�^p\V4p.pRp^p^p^Tu;8:d	V8Ed=MEM8VPW4p	V	'gEMV	PR4V	PR4r�V	P^4pV
^,R8Xd'V'gKyVP	WzR,V34K�V
P4\P9dhV'gR#Vf;V
P4\P9dVP	WzR34K�R#VP	Wz\V434EKVe(VP	W�VPV434RpEKJR#RpVF>wr�pW�8Xd
VfQhW�V
&KW�8XgQhVwr�VPW�V4W
,pK@	R#)r'FrYrl�$:rNNNT)r#�match�group�endr�rdr9rer�r%r�r�)rUr�patt�i�n�parsed_items�morsel_seen�TYPE_ATTRIBUTE�
TYPE_KEYVALUEr�rYr\r��tpr�r�s&&&             r�__parse_string�BaseCookie.__parse_string
sy��
����H���������
�
�1�j�q�j�j��J�J�s�&�E������U�+�U�[�[��-?���	�	�!��A��1�v��}�"���#�#�^��W�e�$D�E������ 0� 0�0�"���=��y�y�{�f�m�m�3�$�+�+�^�$�,G�H�� �'�'��h�u�o�(N�O��"��#�#�]��9J�9J�5�9Q�$R�S�"���
��*�N�B�U��#��}�$�}��#���*�*�*�"�
���
�
�3�d�+��I��+rrrM)Nr�z
)r	r
rrr�r�r�rVr�rfr�r�r�r�r��_CookiePatternr�r
r�r�s@rrr�sL����1����'�(� ��G�E�!��(6�:�:rc�0a�]tRtRtoRtRtRtRtVtR#)riJz�
SimpleCookie supports strings as cookie values.  When setting
the value using the dictionary assignment notation, SimpleCookie
calls the builtin str() to convert the value to a string.  Values
received from HTTP are kept as strings.
c��\V4V3#rM)r%r�s&&rr��SimpleCookie.value_decodeQs����}�c�!�!rc�2�\V4pV\V43#rM)rrr�s&& rr��SimpleCookie.value_encodeTs���S����v�f�~�%�%rrN)	r	r
rrr�r�r�r
r�r�s@rrrJs�����"�&�&r)rrr)�Mon�Tue�Wed�Thu�Fri�Sat�Sun)
N�Jan�Feb�Mar�Apr�May�Jun�Jul�Aug�Sep�Oct�Nov�Dec)*r��re�stringr��__all__r�r�r�r��	Exceptionr�
ascii_letters�digits�_LegalChars�_UnescapedCharsr��range�map�ordrrR�compile�escape�	fullmatchrr�subr$r r%�_weekdayname�
_monthnamer7rQr9�_LegalKeyChars�_LegalValueChars�ASCII�VERBOSEr�rr)r�s0r�<module>rs���NX�z
�
��
7���G�G�	�����
�X�X�
�
	�)�	�"�"�"�V�]�]�2�5G�G����/���E�#�J��#�c�#��.G�*H�H�J�H�1��(�Q�,��H�J�������H�e���I�v���
�
�
�7�R�Y�Y�{�%;�;�<�F�F�
�
6��z�z�8�9�=�=���/�6A��8�
��<�:�F�k8�T�k8�nB��!�G�+�����	���	�	�����&
���B�J�J�	�' ��2I��I�X&�:�&��K
Js�F*