skip to navigation
skip to content

urlfetch 1.0

An easy to use HTTP client

Package Documentation

Latest Version: 1.0.2

urlfetch is a simple, lightweight and easy to use HTTP client for Python. It is distributed as a single file module and has no depencencies other than the Python Standard Library.


  • Distributed as a single file module, has no depencencies other than the Python Standard Library.
  • Pure Python, works fine with gevent.
  • Small codebase, about 1000 lines and 30% are comments and blank lines. Only 10 minutes you can known every detail.
  • Random user-agent.
  • Support streaming.


$ pip install urlfetch

Hello World

from urlfetch import get

response = get('')
print response.content

Upload file

from urlfetch import post

response = post(
    headers = {
        'Referer': '',
    files = {
        'fieldname1': open('/path/to/file', 'rb'),
        #'fieldname2': 'file content', # file must have a filename
        'fieldname3': ('filename', open('/path/to/file2', 'rb')),
        'fieldname4': ('filename', 'file content'),
    data = {
        'foo': 'bar'

print response.status, response.content
File Type Py Version Uploaded on Size
urlfetch-1.0.tar.bz2 (md5) Source 2014-03-22 21KB
urlfetch-1.0.tar.gz (md5) Source 2014-03-22 24KB (md5) Source 2014-03-22 27KB
  • Downloads (All Versions):
  • 97 downloads in the last day
  • 1184 downloads in the last week
  • 6162 downloads in the last month