index.rst 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. urllib3
  2. =======
  3. .. toctree::
  4. :hidden:
  5. :maxdepth: 2
  6. user-guide
  7. advanced-usage
  8. reference/index
  9. contributing
  10. urllib3 is a powerful, *sanity-friendly* HTTP client for Python. Much of the
  11. Python ecosystem :ref:`already uses <who-uses>` urllib3 and you should too.
  12. urllib3 brings many critical features that are missing from the Python
  13. standard libraries:
  14. - Thread safety.
  15. - Connection pooling.
  16. - Client-side SSL/TLS verification.
  17. - File uploads with multipart encoding.
  18. - Helpers for retrying requests and dealing with HTTP redirects.
  19. - Support for gzip and deflate encoding.
  20. - Proxy support for HTTP and SOCKS.
  21. - 100% test coverage.
  22. urllib3 is powerful and easy to use::
  23. >>> import urllib3
  24. >>> http = urllib3.PoolManager()
  25. >>> r = http.request('GET', 'http://httpbin.org/robots.txt')
  26. >>> r.status
  27. 200
  28. >>> r.data
  29. 'User-agent: *\nDisallow: /deny\n'
  30. Installing
  31. ----------
  32. urllib3 can be installed with `pip <https://pip.pypa.io>`_::
  33. $ pip install urllib3
  34. Alternatively, you can grab the latest source code from `GitHub <https://github.com/shazow/urllib3>`_::
  35. $ git clone git://github.com/shazow/urllib3.git
  36. $ python setup.py install
  37. Usage
  38. -----
  39. The :doc:`user-guide` is the place to go to learn how to use the library and
  40. accomplish common tasks. The more in-depth :doc:`advanced-usage` guide is the place to go for lower-level tweaking.
  41. The :doc:`reference/index` documentation provides API-level documentation.
  42. .. _who-uses:
  43. Who uses urllib3?
  44. -----------------
  45. * `Requests <http://python-requests.org/>`_
  46. * `Pip <https://pip.pypa.io>`_
  47. * & more!
  48. License
  49. -------
  50. urllib3 is made available under the MIT License. For more details, see `LICENSE.txt <https://github.com/shazow/urllib3/blob/master/LICENSE.txt>`_.
  51. Contributing
  52. ------------
  53. We happily welcome contributions, please see :doc:`contributing` for details.