python-requests Installation or Setup


Example

python-requests is available on PyPI, the Python Package Index, which means it can be installed through pip:

pip install requests

Up-to-date source code can be found on the requests GitHub repository

If you wish to install it from source, you can do this by either cloning the GitHub repository:

git clone git://github.com/kennethreitz/requests.git

Or by getting the tarball (-O writes the output to file; -L follows redirects):

curl -OL https://github.com/kennethreitz/requests/tarball/master

Then you can install it by executing the setup.py

python setup.py install

However you installed it, you can start using it by importing the usual way

>>> import requests
>>> requests.get('http://stackoverflow.com')