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    
contego / home / tvault / .virtenv / lib / python2.7 / site-packages / urllib3 / filepost.pyc
Size: Mime:
ó
èEYc@@sªddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZej
d	ƒd
Zd„Zd„Zd
„Zdd„ZdS(i(tabsolute_importN(tuuid4(tBytesIOi(tsix(tb(tRequestFieldsutf-8icC@s
tƒjS(sN
    Our embarrassingly-simple replacement for mimetools.choose_boundary.
    (Rthex(((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pytchoose_boundaryscc@sgt|tƒr!tj|ƒ}nt|ƒ}x3|D]+}t|tƒrQ|Vq4tj|ŒVq4WdS(s†
    Iterate over fields.

    Supports list of (k, v) tuples and dicts, and lists of
    :class:`~urllib3.fields.RequestField`.

    N(t
isinstancetdictRt	iteritemstiterRtfrom_tuples(tfieldstitfield((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pytiter_field_objectss
cC@s4t|tƒr&d„tj|ƒDƒSd„|DƒS(s-
    .. deprecated:: 1.6

    Iterate over fields.

    The addition of :class:`~urllib3.fields.RequestField` makes this function
    obsolete. Instead, use :func:`iter_field_objects`, which returns
    :class:`~urllib3.fields.RequestField` objects.

    Supports list of (k, v) tuples and dicts.
    cs@s!|]\}}||fVqdS(N((t.0tktv((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pys	<genexpr>6scs@s!|]\}}||fVqdS(N((RRR((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pys	<genexpr>8s(RR	RR
(R
((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pytiter_fields)scC@stƒ}|dkr!tƒ}nx­t|ƒD]Ÿ}|jtd|ƒƒt|ƒj|jƒƒ|j}t	|t
ƒr‹t|ƒ}nt	|tj
ƒr³t|ƒj|ƒn
|j|ƒ|jdƒq.W|jtd|ƒƒtd|ƒ}|jƒ|fS(sJ
    Encode a dictionary of ``fields`` using the multipart/form-data MIME format.

    :param fields:
        Dictionary of fields or list of (key, :class:`~urllib3.fields.RequestField`).

    :param boundary:
        If not specified, then a random boundary will be generated using
        :func:`mimetools.choose_boundary`.
    s--%s
s
s--%s--
s multipart/form-data; boundary=%sN(RtNoneRRtwriteRtwritertrender_headerstdataRtinttstrRt	text_typetgetvalue(R
tboundarytbodyRRtcontent_type((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pytencode_multipart_formdata;s 		
(t
__future__RtcodecstuuidRtioRtpackagesRtpackages.sixRR
RtlookupRRRRRR!(((sE/home/tvault/.virtenv/lib/python2.7/site-packages/urllib3/filepost.pyt<module>s