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-25.5.0.tar.gz (83.6 kB view details)

Uploaded Source

Built Distribution

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

treq-25.5.0-py3-none-any.whl (77.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for treq-25.5.0.tar.gz
Algorithm Hash digest
SHA256 25dde3a55ae85ec2f2c56332c99aef255ab14f997d0d00552ebff13538a9804a
MD5 b0a3c2e315375388e820019afc59919d
BLAKE2b-256 ed7bb9dba8d947584481aad7e29b01f2ea6bbe794a0352e0cdb68e99ab135c31

See more details on using hashes here.

Provenance

The following attestation bundles were made for treq-25.5.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-25.5.0-py3-none-any.whl.

File metadata

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

File hashes

Hashes for treq-25.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e99d4e66cacaa1f0da82bb60b317d104c29dbd8ac0a75d7f657b348178d830f4
MD5 ca619add03632ddf149eaa3aa5463579
BLAKE2b-256 98b860b5817abccc4f8aaf55919407addaf5f91bd49628464778c7884948126a

See more details on using hashes here.

Provenance

The following attestation bundles were made for treq-25.5.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