Skip to main content

An easy to use HTTP client

Project description

Description

An easy to use HTTP client.

Installation

$ pip install urlfetch -U

Hello World

from urlfetch import get

response = get('http://python.org/')
print response.body

Upload file

from urlfetch import post

response = post(
    'http://127.0.0.1:8888/upload',
    headers = {
        'Referer': 'http://127.0.0.1/',
    },
    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.body

Contributors

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

urlfetch-0.4.0.zip (24.2 kB view details)

Uploaded Source

urlfetch-0.4.0.tar.gz (22.0 kB view details)

Uploaded Source

urlfetch-0.4.0.tar.bz2 (19.1 kB view details)

Uploaded Source

File details

Details for the file urlfetch-0.4.0.zip.

File metadata

  • Download URL: urlfetch-0.4.0.zip
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for urlfetch-0.4.0.zip
Algorithm Hash digest
SHA256 f75b6dcc6220c334813c8ed93f6d8deb3105a19939474a431e36b975e288a20f
MD5 2aa8eed8492d8d5b35e4a594c932906a
BLAKE2b-256 f9956794c0f7e6f6baf87c6215201cc44b9c197bc538f8b85ff6b273886f7759

See more details on using hashes here.

File details

Details for the file urlfetch-0.4.0.tar.gz.

File metadata

  • Download URL: urlfetch-0.4.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for urlfetch-0.4.0.tar.gz
Algorithm Hash digest
SHA256 87ea91c3701dc26d11280bcacf6c75a7cd732e790ac674af9b57e106224c8cd5
MD5 b55f1ba34fabc380330cd5b9e65733f6
BLAKE2b-256 4a913e91835b47ce69323a99f7ad9082cb40988532c68f394e8277b3fef1d1a3

See more details on using hashes here.

File details

Details for the file urlfetch-0.4.0.tar.bz2.

File metadata

  • Download URL: urlfetch-0.4.0.tar.bz2
  • Upload date:
  • Size: 19.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for urlfetch-0.4.0.tar.bz2
Algorithm Hash digest
SHA256 62e1f43cfd35cda263af1b341959125c18c17900809658db788aae400c765d3d
MD5 43a37d19b11325f194663fb8f17f62c4
BLAKE2b-256 2287903b7bf508c528186ca22dcbd9d487af07bdb6e0d8ad3a9be4ab33173594

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page