File transport adapter for httpx.
Project description
httpx-file
Transport adapter fort httpx to allow
file://
URI fetching in the local filesystem.
Installation
pip install httpx-file
Usage
httpx-file subclasses httpx.Client
, so you can just replace httpx.Client
with httpx_file.Client
to get the same behavior with added file://
protocol
support.
from httpx_file import Client
client = Client()
client.get('file:///etc/fstab)
Or you can also mount FileTransport
in a httpx.Client
instance.
from httpx_file import FileTransport
from httpx import Client
client = Client(mounts={'file://': FileTransport()})
client.get('file:///etc/fstab)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
httpx-file-0.0.1.dev0.tar.gz
(2.7 kB
view hashes)
Built Distribution
Close
Hashes for httpx_file-0.0.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1555e9efefcee5ec2b32999480699a4344c776b603a077a0564fc306a6a670e5 |
|
MD5 | 77dcf5d80a67cb5f7757bbd4d2558c7d |
|
BLAKE2b-256 | a6759874acf78b128ace4a9e336ec41013989e1f934ce67d2f3b503ea18fa8b3 |