Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
ó
èEYc@@sgddlmZddlZddlZddlmZdd„Zd„Zde	fd	„ƒYZ
dS(
i(tabsolute_importNi(tsixsapplication/octet-streamcC@s!|rtj|ƒdp|S|S(sæ
    Guess the "Content-Type" of a file.

    :param filename:
        The filename to guess the "Content-Type" of using :mod:`mimetypes`.
    :param default:
        If no "Content-Type" can be guessed, default to `default`.
    i(t	mimetypest
guess_type(tfilenametdefault((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pytguess_content_types	c@sµt‡fd†dDƒƒs^d|ˆf}y|jdƒWnttfk
rVq^X|SntjrŒtˆtjƒrŒˆjdƒ‰ntj	j
ˆdƒ‰d|ˆf‰ˆS(s 
    Helper function to format and quote a single header parameter.

    Particularly useful for header parameters which might contain
    non-ASCII values, like file names. This follows RFC 2231, as
    suggested by RFC 2388 Section 4.4.

    :param name:
        The name of the parameter, a string expected to be ASCII only.
    :param value:
        The value of the parameter, provided as a unicode string.
    c3@s|]}|ˆkVqdS(N((t.0tch(tvalue(sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pys	<genexpr>#ss"\
s%s="%s"tasciisutf-8s%s*=%s(tanytencodetUnicodeEncodeErrortUnicodeDecodeErrorRtPY3t
isinstancet	text_typetemailtutilstencode_rfc2231(tnameR	tresult((R	sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pytformat_header_params
tRequestFieldcB@sYeZdZddd„Zed„ƒZd„Zd„Zd„Z	dddd„Z
RS(sK
    A data container for request body parameters.

    :param name:
        The name of this request field.
    :param data:
        The data/value body.
    :param filename:
        An optional filename of the request field.
    :param headers:
        An optional dict-like object of headers to initially use for the field.
    cC@s@||_||_||_i|_|r<t|ƒ|_ndS(N(t_namet	_filenametdatatheaderstdict(tselfRRRR((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyt__init__?s				cC@s‰t|tƒrNt|ƒdkr3|\}}}q`|\}}t|ƒ}nd}d}|}|||d|ƒ}|jd|ƒ|S(s³
        A :class:`~urllib3.fields.RequestField` factory from old-style tuple parameters.

        Supports constructing :class:`~urllib3.fields.RequestField` from
        parameter of key/value strings AND key/filetuple. A filetuple is a
        (filename, data, MIME type) tuple where the MIME type is optional.
        For example::

            'foo': 'bar',
            'fakefile': ('foofile.txt', 'contents of foofile'),
            'realfile': ('barfile.txt', open('realfile').read()),
            'typedfile': ('bazfile.bin', open('bazfile').read(), 'image/jpeg'),
            'nonamefile': 'contents of nonamefile field',

        Field names and filenames must be unicode.
        iRtcontent_typeN(RttupletlenRtNonetmake_multipart(tclst	fieldnameR	RRR t
request_param((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pytfrom_tuplesGscC@s
t||ƒS(s
        Overridable helper function to format a single header parameter.

        :param name:
            The name of the parameter, a string expected to be ASCII only.
        :param value:
            The value of the parameter, provided as a unicode string.
        (R(RRR	((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyt_render_partis	cC@svg}|}t|tƒr*|jƒ}nx<|D]4\}}|dk	r1|j|j||ƒƒq1q1Wdj|ƒS(sO
        Helper function to format and quote a single header.

        Useful for single headers that are composed of multiple items. E.g.,
        'Content-Disposition' fields.

        :param header_parts:
            A sequence of (k, v) typles or a :class:`dict` of (k, v) to format
            as `k1="v1"; k2="v2"; ...`.
        s; N(RRtitemsR#tappendR)tjoin(Rtheader_partstpartstiterableRR	((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyt
_render_partsts cC@sÅg}dddg}xD|D]<}|jj|tƒr|jd||j|fƒqqWxL|jjƒD];\}}||krl|r§|jd||fƒq§qlqlW|jdƒdj|ƒS(s=
        Renders the headers for this request field.
        sContent-DispositionsContent-TypesContent-Locations%s: %ss
(RtgettFalseR+R*R,(Rtlinest	sort_keystsort_keytheader_nametheader_value((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pytrender_headersŠs
%!
c
C@st|p	d|jd<|jdcdjd|jd|jfd|jffƒgƒ7<||jd<||jd<d	S(
s|
        Makes this request field into a multipart request field.

        This method overrides "Content-Disposition", "Content-Type" and
        "Content-Location" headers to the request parameter.

        :param content_type:
            The 'Content-Type' of the request body.
        :param content_location:
            The 'Content-Location' of the request body.

        s	form-datasContent-Dispositions; tRRsContent-TypesContent-LocationN(RR,R0RR(Rtcontent_dispositionR tcontent_location((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyR$s	'
N(t__name__t
__module__t__doc__R#RtclassmethodR(R)R0R8R$(((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyR2s"			(t
__future__Rtemail.utilsRRtpackagesRRRtobjectR(((sC/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/fields.pyt<module>s