Skip to content

Read file over HTTP(s) protocol via python file system 2 interface

License

Notifications You must be signed in to change notification settings

moremoban/httpfs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

httpfs

https://codecov.io/github/moremoban/httpfs/coverage.png https://pepy.tech/badge/httpfs/month https://img.shields.io/github/stars/moremoban/httpfs.svg?style=social&maxAge=3600&label=Star

What can you do with it?

With Python File System 2, you can do:

>>> import fs
>>> with fs.open_fs('https://www.google.com') as f:
...     print(f.readbytes('index.html'))
b'<!doctype ....'

Have fun!

Why

With httpfs, moban can access any files over http(s) as its template or data file:

$ moban -t 'https://raw.githubusercontent.com/moremoban/pypi-mobans/dev/templates/_version.py.jj2'\
  -c 'https://raw.githubusercontent.com/moremoban/pypi-mobans/dev/config/data.yml'\
  -o _version.py

Installation

You can install httpfs via pip:

$ pip install httpfs

or clone it and install it:

$ git clone https://github.com/moremoban/httpfs.git
$ cd httpfs
$ python setup.py install

About

Read file over HTTP(s) protocol via python file system 2 interface

Resources

License

Stars

Watchers

Forks

Packages

No packages published