1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110
|
Metadata-Version: 2.1
Name: treq
Version: 24.9.1
Summary: High-level Twisted HTTP Client API
Home-page: https://github.com/twisted/treq
Author: David Reid
Author-email: dreid@dreid.org
Maintainer: Tom Most
Maintainer-email: twm@freecog.net
License: MIT/X
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Framework :: Twisted
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: incremental
Requires-Dist: requests>=2.1.0
Requires-Dist: hyperlink>=21.0.0
Requires-Dist: Twisted[tls]>=22.10.0
Requires-Dist: attrs
Requires-Dist: typing_extensions>=3.10.0
Provides-Extra: dev
Requires-Dist: pep8; extra == "dev"
Requires-Dist: pyflakes; extra == "dev"
Requires-Dist: httpbin==0.7.0; extra == "dev"
Requires-Dist: werkzeug==2.0.3; extra == "dev"
Provides-Extra: docs
Requires-Dist: sphinx<7.0.0; extra == "docs"
treq: High-level Twisted HTTP Client API
========================================
.. |pypi| image:: https://img.shields.io/pypi/v/treq.svg
:alt: PyPI
:target: https://pypi.org/project/treq/
.. |calver| image:: https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg
:alt: calver: YY.MM.MICRO
:target: https://calver.org/
.. |coverage| image:: https://coveralls.io/repos/github/twisted/treq/badge.svg
:alt: Coverage
:target: https://coveralls.io/github/twisted/treq
.. |documentation| image:: https://readthedocs.org/projects/treq/badge/
:alt: Documentation
:target: https://treq.readthedocs.org
|pypi|
|calver|
|coverage|
|documentation|
``treq`` is an HTTP library inspired by
`requests <https://requests.readthedocs.io/>`_ but written on top of
`Twisted <https://www.twistedmatrix.com>`_'s
`Agents <https://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_.
It provides a simple, higher level API for making HTTP requests when
using Twisted.
.. code-block:: python
>>> import treq
>>> async def main(reactor):
... response = await treq.get("https://github.com")
... print(response.code)
... body = await response.text()
... print("<!DOCTYPE html>" in body)
>>> from twisted.internet.task import react
>>> react(main)
200
True
For more info `read the docs <https://treq.readthedocs.org>`_.
Contributing
------------
``treq`` development is hosted on `GitHub <https://github.com/twisted/treq>`_.
We welcome contributions: feel free to fork and send contributions over.
See `CONTRIBUTING.rst <https://github.com/twisted/treq/blob/master/CONTRIBUTING.rst>`_ for more info.
Code of Conduct
---------------
Refer to the `Twisted code of conduct <https://github.com/twisted/twisted/blob/trunk/code_of_conduct.md>`_.
Copyright and License
---------------------
``treq`` is made available under the MIT license.
See `LICENSE <./LICENSE>`_ for legal details and copyright notices.
|