Skip to main content

High-level Twisted HTTP Client API

Project description

PyPI calver: YY.MM.MICRO 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.

>>> 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

treq-24.9.1.tar.gz (85.6 kB view details)

Uploaded Source

Built Distribution

treq-24.9.1-py3-none-any.whl (78.1 kB view details)

Uploaded Python 3

File details

Details for the file treq-24.9.1.tar.gz.

File metadata

  • Download URL: treq-24.9.1.tar.gz
  • Upload date:
  • Size: 85.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for treq-24.9.1.tar.gz
Algorithm Hash digest
SHA256 15da7fc404f3e4ed59d0abe5f8eef4966fabbe618039a2a23bc7c15305cefea8
MD5 a48996ff540651deded304b638ba54ea
BLAKE2b-256 0894424f3bb11eaf464880d076cca2e9d0ee21a1be805fe9761b87eccba5b3ae

See more details on using hashes here.

File details

Details for the file treq-24.9.1-py3-none-any.whl.

File metadata

  • Download URL: treq-24.9.1-py3-none-any.whl
  • Upload date:
  • Size: 78.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.1 CPython/3.12.6

File hashes

Hashes for treq-24.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 eee4756fd9a857c77f180fd5202b52c518f2d3e2826dce28b89066c03bfc45d0
MD5 dc83038462e2f818733012a749c12763
BLAKE2b-256 80eae2fb71e9dab3efaef7bd33894e23e8ef515e1d92debb1dcf4594815e09ed

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page