Url Encoder Url Decoder
More Tools
Other tools: Base64 Decode | Base64 Image Decoder | Base64 Encode | Base64 Image Encoder

Python urlencode()

urlencode - Convert a mapping object or a sequence of two-element tuples to a percent-encoded string.

Function

urllib.urlencode( query [, doseq ] )

Parameters

query - When a sequence of two-element tuples is used as the query argument, the first element of each tuple is a key and the second is a value.
doseq - If set to true, individual key=value pairs separated by '&' are generated for each element of the value sequence for the key.

Return value

Returns a url encoded string

Example
>>> import urllib
>>> params = urllib.urlencode( {'param': 'url encode'} )
>>> print "http://example.com/?" + params
Output
http://example.com/?param=url+encode
See also:
Python unqoute