Web lists-archives.com

Bug#879125: ITP: python-requests-file -- File transport adapter for Requests

Package: wnpp
Severity: wishlist
Owner: Antoine Beaupre <anarcat@xxxxxxxxxx>

* Package name    : python-requests-file
  Version         : 2017-04-28
  Upstream Author : David Shea
* URL             : https://pypi.python.org/pypi/requests-file
* License         : Apache 2.0
  Programming Lang: Python
  Description     : File transport adapter for Requests

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


 * 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.


I plan on shoving this into py2dsp and co-maintaining it with whoever
wants to. I need this to simplify feed2exec local file:// access
routines and I think it's a generally good package to have available
(and why isn't this in requests in the first place??)

I'd be happy to delegate this to the Python team as well of course.