Skip to main content

High-level Twisted HTTP Client API

Project description

PyPI calver: YY.MM.MICRO 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-26.7.0.tar.gz (81.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

treq-26.7.0-py3-none-any.whl (75.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: treq-26.7.0.tar.gz
  • Upload date:
  • Size: 81.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for treq-26.7.0.tar.gz
Algorithm Hash digest
SHA256 43e728e12aca2d897c626cf07dc7b4392749b73de050a7d66e086cb3a6e15da9
MD5 eb16ad46a399062514b09300635f3b0b
BLAKE2b-256 921396aceb81d076eea518bf174048db701ac8b139c7aed1082913318a55a7d2

See more details on using hashes here.

Provenance

The following attestation bundles were made for treq-26.7.0.tar.gz:

Publisher: release.yaml on twisted/treq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: treq-26.7.0-py3-none-any.whl
  • Upload date:
  • Size: 75.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for treq-26.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0a56ac4d970f7b1e27a4df4057d225efd84524b1847e123a725c531039702f98
MD5 d6be5f5d10857a1de1df0c0cf88250ca
BLAKE2b-256 2a6f6396d90267494553b7db6dc6aaaf8a773255eae209d4381428672f52f716

See more details on using hashes here.

Provenance

The following attestation bundles were made for treq-26.7.0-py3-none-any.whl:

Publisher: release.yaml on twisted/treq

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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