Product
Introducing License Enforcement in Socket
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
PLEASE USE JUST THE RECENT VERSION OF PYTHON-REQUESTS, it has already SOCKS support bundled:
pip install -U requests[socks]
Requesocks is the fork of github.com/foxx/requests == python-requests working with socks proxy (i.e tor). Just renamed the package to allow simultaneously use of original requests and socks-capable-requests.
.. image:: https://secure.travis-ci.org/kennethreitz/requests.png?branch=develop
Requests is an ISC Licensed HTTP library, written in Python, for human beings.
Most existing Python modules for sending HTTP requests are extremely verbose and cumbersome. Python's builtin urllib2 module provides most of the HTTP capabilities you should need, but the api is thoroughly broken. It requires an enormous amount of work (even method overrides) to perform the simplest of tasks.
Things shouldn't be this way. Not in Python.
:: session = requesocks.session() session.proxies = {'http': 'socks5://127.0.0.1:9050', 'https': 'socks5://127.0.0.1:9050'} r = session.get('https://api.github.com', auth=('user', 'pass')) print(r.status_code) print(r.headers['content-type']) print(r.text) ...
See the same code, without Requests <https://gist.github.com/973705>
_.
Requests allow you to send HEAD, GET, POST, PUT,
PATCH, and DELETE HTTP requests. You can add headers, form data,
multipart files, and parameters with simple Python dictionaries, and access the
response data in the same way. It's powered by httplib and urllib3 <https://github.com/shazow/urllib3>
_, but it does all the hard work and crazy
hacks for you.
To install requests, simply: ::
$ pip install requesocks
Or, if you absolutely must: ::
$ easy_install requesocks
But, you really shouldn't do that.
#. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug. There is a Contributor Friendly tag for issues that should be ideal for people who are not very familiar with the codebase yet.
#. Fork the repository
_ on Github to start making your changes to the develop branch (or branch off of it).
#. Write a test which shows that the bug was fixed or that the feature works as expected.
#. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to AUTHORS_.
.. _the repository
: http://github.com/kennethreitz/requests
.. _AUTHORS: http://github.com/kennethreitz/requests/blob/master/AUTHORS
0.10.8 (2012-03-09) +++++++++++++++++++
trust_env
configuration for disabling system/environment hints.0.10.7 (2012-03-07) +++++++++++++++++++
encode_uri
= False0.10.6 (2012-02-25) +++++++++++++++++++
0.10.5 (2012-02-25) +++++++++++++++++++
0.10.4 (2012-02-20) +++++++++++++++++++
0.10.3 (2012-02-20) +++++++++++++++++++
0.10.2 (2012-01-15) +++++++++++++++++++
0.10.1 (2012-01-23) +++++++++++++++++++
0.10.0 (2012-01-21) +++++++++++++++++++
Response.content
is now bytes-only. (Backwards Incompatible)Response.text
is unicode-only.Response.encoding
is specified and chardet
is available, Respoonse.text
will guess an encoding.decode_unicode
. (Backwards Incompatible)Response.register_hook
for registering hooks within the pipeline.Response.url
is now Unicode.0.9.3 (2012-01-18) ++++++++++++++++++
0.9.2 (2012-01-18) ++++++++++++++++++
0.9.1 (2012-01-06) ++++++++++++++++++
0.9.0 (2011-12-28) ++++++++++++++++++
0.8.9 (2011-12-28) ++++++++++++++++++
0.8.8 (2011-12-28) ++++++++++++++++++
0.8.7 (2011-12-24) ++++++++++++++++++
0.8.6 (2011-12-18) ++++++++++++++++++
0.8.5 (2011-12-14) ++++++++++++++++++
0.8.4 (2011-12-11) ++++++++++++++++++
0.8.3 (2011-11-27) ++++++++++++++++++
0.8.2 (2011-11-19) ++++++++++++++++++
Response.encoding
.[
, ]
, and _
allowed.0.8.1 (2011-11-15) ++++++++++++++++++
0.8.0 (2011-11-13) ++++++++++++++++++
0.7.6 (2011-11-07) ++++++++++++++++++
0.7.5 (2011-11-04) ++++++++++++++++++
0.7.4 (2011-10-26) ++++++++++++++++++
0.7.3 (2011-10-23) ++++++++++++++++++
0.7.2 (2011-10-23) ++++++++++++++++++
0.7.1 (2011-10-23) ++++++++++++++++++
0.7.0 (2011-10-22) ++++++++++++++++++
0.6.6 (2011-10-19) ++++++++++++++++++
0.6.5 (2011-10-18) ++++++++++++++++++
0.6.4 (2011-10-13) ++++++++++++++++++
decode_unicode
setting.r.read/close
methods.r.faw
interface for advanced response usage.*0.6.3 (2011-10-13) ++++++++++++++++++
requests.async
module, for making async requests w/ gevent.0.6.2 (2011-10-09) ++++++++++++++++++
0.6.1 (2011-08-20) ++++++++++++++++++
\o/
settings.max_redirects
)0.6.0 (2011-08-17) ++++++++++++++++++
0.5.1 (2011-07-23) ++++++++++++++++++
read()
)python-requests.org
default User-Agent header0.5.0 (2011-06-21) ++++++++++++++++++
r.requests.get('hwe://blah'); r.raise_for_status()
0.4.1 (2011-05-22) ++++++++++++++++++
0.4.0 (2011-05-15) ++++++++++++++++++
0.3.4 (2011-05-14) ++++++++++++++++++
0.3.3 (2011-05-12) ++++++++++++++++++
0.3.2 (2011-04-15) ++++++++++++++++++
0.3.1 (2011-04-01) ++++++++++++++++++
0.3.0 (2011-02-25) ++++++++++++++++++
0.2.4 (2011-02-19) ++++++++++++++++++
0.2.3 (2011-02-15) ++++++++++++++++++
0.2.2 (2011-02-14) ++++++++++++++++++
0.2.1 (2011-02-14) ++++++++++++++++++
0.2.0 (2011-02-14) ++++++++++++++++++
0.0.1 (2011-02-13) ++++++++++++++++++
FAQs
Python HTTP for Humans, with socks proxy support
We found that requesocks demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Ensure open-source compliance with Socket’s License Enforcement Beta. Set up your License Policy and secure your software!
Product
We're launching a new set of license analysis and compliance features for analyzing, managing, and complying with licenses across a range of supported languages and ecosystems.
Product
We're excited to introduce Socket Optimize, a powerful CLI command to secure open source dependencies with tested, optimized package overrides.