High-level Twisted HTTP Client API
Project Links
Meta
Author: David Reid
Maintainer: Tom Most
Requires Python: >=3.8.0
Classifiers
Development Status
- 5 - Production/Stable
Framework
- Twisted
Intended Audience
- Developers
License
- OSI Approved :: MIT License
Operating System
- OS Independent
Programming Language
- Python
- Python :: 3.8
- Python :: 3.9
- Python :: 3.10
- Python :: 3.11
- Python :: 3.12
- Python :: 3.13
- Python :: Implementation :: CPython
- Python :: Implementation :: PyPy
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.
>>> 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.
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 for legal details and copyright notices.
Jun 03, 2025
25.5.0
Sep 19, 2024
24.9.1
Sep 18, 2024
24.9.0
Nov 04, 2023
23.11.0
Feb 09, 2022
22.2.0
Jan 30, 2022
22.1.0
May 24, 2021
21.5.0
Jan 15, 2021
21.1.0
Sep 27, 2020
20.9.0
Sep 27, 2020
20.9.0rc1
Apr 17, 2020
20.4.1
Mar 16, 2020
20.3.0
Mar 16, 2020
20.3.0rc1
Jun 29, 2018
18.6.0
Aug 19, 2017
17.8.0
Aug 01, 2017
17.7.0
Mar 28, 2017
17.3.1
Mar 28, 2017
17.3.0
Dec 14, 2016
16.12.0
Dec 18, 2015
15.1.0
Feb 05, 2015
15.0.0
Mar 06, 2014
0.2.1
Apr 30, 2013
0.2.0
Dec 28, 2012
0.1.0