Skip to main content

File transport adapter for Requests

Project description

Requests-Text is a transport adapter for use with the Requests Python library to allow text under text:// URLs.

To use:

import requests
from requests_text import TextAdapter

s = requests.Session()
s.mount('text://', TextAdapter())

resp = s.get('text://sometext')

Features

  • Will open and read text

  • Might set a Content-Length header

  • That’s about it


Contributions welcome! Feel free to open a pull request against https://github.com/huakim/python-requests-text

License

To maximise compatibility with Requests, this code is licensed under the Apache license. See LICENSE for more details.

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

requests_text-1.0.2.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

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

requests_text-1.0.2-py2.py3-none-any.whl (2.7 kB view details)

Uploaded Python 2Python 3

File details

Details for the file requests_text-1.0.2.tar.gz.

File metadata

  • Download URL: requests_text-1.0.2.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for requests_text-1.0.2.tar.gz
Algorithm Hash digest
SHA256 b9e5359b93ef0d9e51d470a7c6a532860adae8cc4deedcab9e032d2f01066fd9
MD5 5132717bd707ac65ae19c5b81f9c5208
BLAKE2b-256 d89f17284a72bd46647b8042a51d2b7cffd5997bf41112f07211142d74b6d7f6

See more details on using hashes here.

File details

Details for the file requests_text-1.0.2-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for requests_text-1.0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 e591e1e6ba684b18dd802dd747a10ccf2f0cbd0d7bdc6e1af3c83bcb0e1d5eae
MD5 6bf73ec8d2ca08db12078c4fadd4ff51
BLAKE2b-256 2dd9143568fe4bbf41fc8171c165c59d512482405300bec437dd5782241826d7

See more details on using hashes here.

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