Skip to main content

A WSGI Proxy using requests

Project description

A WSGI Proxy using requests.

Installation

With pip:

$ pip install requests_proxy

Usage

Create a proxy:

>>> from requests_proxy import Proxy
>>> proxy = Proxy(application_url)

Then use it. Here is an example with WebOb but you can use it like a classic WSGI application:

>>> from webob import Request
>>> req = Request.blank('/form.html')
>>> resp = req.get_response(proxy)
>>> print(resp.text)
<html>...
...</html>

The Proxy application accept some keyword arguments. Those arguments are passed to requests during the process. By default allow_redirects and verify are set to False but you can change the behavior:

>>> proxy = Proxy(application_url, verify=True, allow_redirects=True, max_redirects=10)

Cheers

Changes

0.1

Initial public release

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

requests_proxy-0.1.tar.gz (3.1 kB view details)

Uploaded Source

File details

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

File metadata

File hashes

Hashes for requests_proxy-0.1.tar.gz
Algorithm Hash digest
SHA256 43868ce1deac0b490b5acceb0fa55bb4d643f18860ea07bdf55bbcedeea1b1af
MD5 ab2d094cfacb34256027b02ef0de3b16
BLAKE2b-256 c52527e8dbe9cb1a5e5d9640933deeba3c159031d1656079d6f1f357a0fedb3b

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