skillfed

requests-file

File transport adapter for Requests

requests-file Permissive license Apache 2.0 AGING v3.0.1 released

Install

requests-file on PyPI

pip

pip install requests-file

uv

uv add requests-file

poetry

poetry add requests-file

Package facts

License Apache 2.0 (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies 1 — requests
Maintenance aging — 297 days since the last release
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: requests_file-3.0.1-py2.py3-none-any.whl

Development Status :: 3 - AlphaEnvironment :: PluginsIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3

About requests-file

from the package's own PyPI description — quoted content, verbatim

Requests-File

Requests-File is a transport adapter for use with the Requests_ Python library to allow local filesystem access via file:\/\/ URLs.

To use:

.. code-block:: python

import requests
from requests_file import FileAdapter

s = requests.Session()
s.mount('file://', FileAdapter())

resp = s.get('file:///path/to/file')

Features

  • Will open and read local files
  • Might set a Content-Length header
  • That's about it

No encoding information is set in the response object, so be careful using Response.text: the chardet library will be used to convert the file to a unicode type and it may not detect what you actually want.

EACCES is converted to a 403 status code, and ENOENT is converted to a 404. All other IOError types are converted to a 400.

Contributing

Contributions welcome! Feel free to open a pull request against https://codeberg.org/dashea/requests-file

License

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

.. _Requests: https://github.com/psf/requests

Read as markdown · JSON record · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Requests-File adds file:// URL support to the Requests HTTP library, allowing you to read local files through the same Session interface you use for HTTP requests.

Low friction: pure Python wheel with only requests as a runtime dependency. Maintenance is aging—last release was 297 days ago and the package is marked Alpha—but no active issues are documented.

Apache 2.0 permissive license aligns with Requests itself, imposing no restrictions on commercial or proprietary use; attribution required but no copyleft obligations.

Usage

import requests
from requests_file import FileAdapter

s = requests.Session()
s.mount('file://', FileAdapter())
resp = s.get('file:///path/to/file')
print(resp.text)

Requires requests to be installed; no Python version specified in package metadata, so compatibility is unverified.

Verdict: Requests-File is a lightweight, permissively licensed adapter for reading local files via Requests' familiar API. Zero known vulnerabilities and low install friction make it safe to adopt, but its Alpha status and 297-day release gap suggest limited active maintenance—suitable for stable use cases where file:// URL support is needed, but not for projects requiring frequent updates.

Needs verification

  • Whether Python 3 is the only supported version or if Python 2 compatibility remains despite the classifier
  • Whether the aging maintenance status reflects deliberate stability or abandonment risk
file url adapter requestslocal file access requests libraryfile:// protocol requestsrequests filesystem transportread local files with requestsfile transport adapter python

Similar packages