Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/twisted/treq
Python requests like API built on top of Twisted's HTTP client.
https://github.com/twisted/treq
http python twisted
Last synced: 4 days ago
JSON representation
Python requests like API built on top of Twisted's HTTP client.
- Host: GitHub
- URL: https://github.com/twisted/treq
- Owner: twisted
- License: other
- Created: 2012-05-18T18:57:21.000Z (over 12 years ago)
- Default Branch: trunk
- Last Pushed: 2024-12-10T11:49:12.000Z (about 2 months ago)
- Last Synced: 2025-01-14T20:18:37.910Z (11 days ago)
- Topics: http, python, twisted
- Language: Python
- Size: 979 KB
- Stars: 589
- Watchers: 28
- Forks: 140
- Open Issues: 57
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGELOG.rst
- Contributing: CONTRIBUTING.rst
- License: LICENSE
- Security: SECURITY.md
Awesome Lists containing this project
- awesome-python-resources - GitHub - 37% open · ⏱️ 21.08.2022): (HTTP)
- best-of-web-python - GitHub - 33% open · ⏱️ 01.05.2024): (HTTP Clients)
README
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 `_ but written on top of
`Twisted `_'s
`Agents `_.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("" in body)>>> from twisted.internet.task import react
>>> react(main)
200
TrueFor more info `read the docs `_.
Contributing
------------``treq`` development is hosted on `GitHub `_.
We welcome contributions: feel free to fork and send contributions over.
See `CONTRIBUTING.rst `_ for more info.Code of Conduct
---------------Refer to the `Twisted code of conduct `_.
Copyright and License
---------------------``treq`` is made available under the MIT license.
See `LICENSE <./LICENSE>`_ for legal details and copyright notices.