Skip to main content

Generic interface to access HTTP clients

Project description

anyhttp provides a generic layer to use existing http clients.

The primary purpose is to be used by packages which need http, do not need or want to depend on one of the existing clients, and/or want to re-used by applications which already have a dependency on a http clients.

anyhttp supports:

  • requests

  • httplib2

  • urllib3

  • pycurl

  • fido

  • httq

  • async_http

  • webob

  • urlfetch

  • simplefetch

  • httputils

  • tornado

  • ihttp

  • basic_http

  • unirest

  • httpstream

  • http1

  • reqres

  • tinydav

  • ultralite

  • urlgrabber

  • dogbutler

  • pylhttp

  • hyper

  • asynchttp

  • geventhttpclient

  • streaming_httplib2

  • bolacha

  • drest

  • httxlib

  • dugong

  • aiohttp

  • yieldfrom.http.client

Normal use

Normal usage of anyhttp involves simply using either:

anyhttp.get_text(url) anyhttp.get_binary(url)

anyhttp will look for a capable http clients in sys.modules. The sequence will look like:

app:

import httplib2 # must be first

import your_package

your_package:

import anyhttp

anyhttp:

http = Wrapper(httplib2)

Testing

anyhttp includes tests that verify the supported clients can perform certain http operations, and that test suite allows basic HTTP conformance testing of HTTP features.

It is easy to add a new client to the test suite. The list of supported clients is in the main anyhttp module, and the test suite automatically applies the tests to new clients added.

The automatic support of additional clients is achieved using python package testscenarios with an unmerged patch. This can be installed from https://code.launchpad.net/~jayvdb/testscenarios/0.4-with_scenarios

Project details


Release history Release notifications | RSS feed

This version

0.1

Download files

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

Source Distribution

anyhttp-0.1.tar.gz (25.0 kB view details)

Uploaded Source

Built Distribution

anyhttp-0.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file anyhttp-0.1.tar.gz.

File metadata

  • Download URL: anyhttp-0.1.tar.gz
  • Upload date:
  • Size: 25.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for anyhttp-0.1.tar.gz
Algorithm Hash digest
SHA256 108d0a4c1db93fccb6f02cacba9afe029497339847d353f76f3880dba2b09d7f
MD5 e1ac288593d8b34477220d583f8f0eaf
BLAKE2b-256 4728ee70864c835676a42ec5e11e50635524012dbe4ca3203e513409362f0777

See more details on using hashes here.

File details

Details for the file anyhttp-0.1-py3-none-any.whl.

File metadata

  • Download URL: anyhttp-0.1-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.2

File hashes

Hashes for anyhttp-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3c0ccd0217995e0304c948d7f0c1eba38889b7b097069ae8d2e59a88bddf0ed5
MD5 b82433f7de0b24d6786caa7befeb6f04
BLAKE2b-256 3c6e0fed76739388e8eb5e678de510fd80710fdb5e1ee35ab85e7be955b08862

See more details on using hashes here.

Supported by

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