treq


Nametreq JSON
Version 24.9.1 PyPI version JSON
download
home_pagehttps://github.com/twisted/treq
SummaryHigh-level Twisted HTTP Client API
upload_time2024-09-19 23:02:56
maintainerTom Most
docs_urlNone
authorDavid Reid
requires_python>=3.7
licenseMIT/X
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage
            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.



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/twisted/treq",
    "name": "treq",
    "maintainer": "Tom Most",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "twm@freecog.net",
    "keywords": null,
    "author": "David Reid",
    "author_email": "dreid@dreid.org",
    "download_url": "https://files.pythonhosted.org/packages/08/94/424f3bb11eaf464880d076cca2e9d0ee21a1be805fe9761b87eccba5b3ae/treq-24.9.1.tar.gz",
    "platform": null,
    "description": "treq: High-level Twisted HTTP Client API\n========================================\n\n.. |pypi| image:: https://img.shields.io/pypi/v/treq.svg\n    :alt: PyPI\n    :target: https://pypi.org/project/treq/\n\n.. |calver| image:: https://img.shields.io/badge/calver-YY.MM.MICRO-22bfda.svg\n    :alt: calver: YY.MM.MICRO\n    :target: https://calver.org/\n\n.. |coverage| image:: https://coveralls.io/repos/github/twisted/treq/badge.svg\n    :alt: Coverage\n    :target: https://coveralls.io/github/twisted/treq\n\n.. |documentation| image:: https://readthedocs.org/projects/treq/badge/\n    :alt: Documentation\n    :target: https://treq.readthedocs.org\n\n|pypi|\n|calver|\n|coverage|\n|documentation|\n\n``treq`` is an HTTP library inspired by\n`requests <https://requests.readthedocs.io/>`_ but written on top of\n`Twisted <https://www.twistedmatrix.com>`_'s\n`Agents <https://twistedmatrix.com/documents/current/api/twisted.web.client.Agent.html>`_.\n\nIt provides a simple, higher level API for making HTTP requests when\nusing Twisted.\n\n.. code-block:: python\n\n    >>> import treq\n\n    >>> async def main(reactor):\n    ...     response = await treq.get(\"https://github.com\")\n    ...     print(response.code)\n    ...     body = await response.text()\n    ...     print(\"<!DOCTYPE html>\" in body)\n\n    >>> from twisted.internet.task import react\n    >>> react(main)\n    200\n    True\n\nFor more info `read the docs <https://treq.readthedocs.org>`_.\n\nContributing\n------------\n\n``treq`` development is hosted on `GitHub <https://github.com/twisted/treq>`_.\n\nWe welcome contributions: feel free to fork and send contributions over.\nSee `CONTRIBUTING.rst <https://github.com/twisted/treq/blob/master/CONTRIBUTING.rst>`_ for more info.\n\nCode of Conduct\n---------------\n\nRefer to the `Twisted code of conduct <https://github.com/twisted/twisted/blob/trunk/code_of_conduct.md>`_.\n\nCopyright and License\n---------------------\n\n``treq`` is made available under the MIT license.\nSee `LICENSE <./LICENSE>`_ for legal details and copyright notices.\n\n\n",
    "bugtrack_url": null,
    "license": "MIT/X",
    "summary": "High-level Twisted HTTP Client API",
    "version": "24.9.1",
    "project_urls": {
        "Homepage": "https://github.com/twisted/treq"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "80eae2fb71e9dab3efaef7bd33894e23e8ef515e1d92debb1dcf4594815e09ed",
                "md5": "dc83038462e2f818733012a749c12763",
                "sha256": "eee4756fd9a857c77f180fd5202b52c518f2d3e2826dce28b89066c03bfc45d0"
            },
            "downloads": -1,
            "filename": "treq-24.9.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "dc83038462e2f818733012a749c12763",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 78121,
            "upload_time": "2024-09-19T23:02:54",
            "upload_time_iso_8601": "2024-09-19T23:02:54.855699Z",
            "url": "https://files.pythonhosted.org/packages/80/ea/e2fb71e9dab3efaef7bd33894e23e8ef515e1d92debb1dcf4594815e09ed/treq-24.9.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0894424f3bb11eaf464880d076cca2e9d0ee21a1be805fe9761b87eccba5b3ae",
                "md5": "a48996ff540651deded304b638ba54ea",
                "sha256": "15da7fc404f3e4ed59d0abe5f8eef4966fabbe618039a2a23bc7c15305cefea8"
            },
            "downloads": -1,
            "filename": "treq-24.9.1.tar.gz",
            "has_sig": false,
            "md5_digest": "a48996ff540651deded304b638ba54ea",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 85614,
            "upload_time": "2024-09-19T23:02:56",
            "upload_time_iso_8601": "2024-09-19T23:02:56.606210Z",
            "url": "https://files.pythonhosted.org/packages/08/94/424f3bb11eaf464880d076cca2e9d0ee21a1be805fe9761b87eccba5b3ae/treq-24.9.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-19 23:02:56",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "twisted",
    "github_project": "treq",
    "travis_ci": false,
    "coveralls": true,
    "github_actions": true,
    "tox": true,
    "lcname": "treq"
}
        
Elapsed time: 1.63918s