Initial commit

This commit is contained in:
Alex committed 2026-11-02 22:54:14 +08:00
commit 57fc3525eb
7311 files changed
+1291398

No files matched your search

@@ -0,0 +1 @@
pip
@@ -0,0 +1,62 @@
Metadata-Version: 2.4
Name: requests-file
Version: 3.0.1
Summary: File transport adapter for Requests
Author-email: David Shea <reallylongword@gmail.com>
License: Apache 2.0
Project-URL: Homepage, https://codeberg.org/dashea/requests-file
Classifier: Development Status :: 3 - Alpha
Classifier: Environment :: Plugins
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Programming Language :: Python :: 3
Description-Content-Type: text/x-rst
License-File: LICENSE
Requires-Dist: requests>=1.0.0
Dynamic: license-file
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
@@ -0,0 +1,9 @@
requests_file-3.0.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
requests_file-3.0.1.dist-info/METADATA,sha256=EF7GB8SpDBGeeIwNFD3YfZ8s_W_byo6pbaXiqlbkyq4,1713
requests_file-3.0.1.dist-info/RECORD,,
requests_file-3.0.1.dist-info/WHEEL,sha256=JNWh1Fm1UdwIQV075glCn4MVuCRs0sotJIq-J6rbxCU,109
requests_file-3.0.1.dist-info/licenses/LICENSE,sha256=Of8bxOFf_O0AR9mWidBvVLspzkeESSegPqop67msDxc,581
requests_file-3.0.1.dist-info/top_level.txt,sha256=RrsFuxV3NL6ITfTlu35VvXPmcn2iZG9tJK5Oudqu7_w,14
requests_file/__init__.py,sha256=xKWbRHhqHeKE-JKTwBbQNsj_WkV75I2P2OUVgRIIOJA,5144
requests_file/__pycache__/__init__.cpython-314.pyc,,
requests_file/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: setuptools (80.9.0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any
@@ -0,0 +1,13 @@
Copyright 2015 Red Hat, Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
@@ -0,0 +1 @@
requests_file