Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/progrium/httpfs
Create filesystems using your favorite HTTP framework.
https://github.com/progrium/httpfs
filesystem flask fuse golang http
Last synced: about 1 month ago
JSON representation
Create filesystems using your favorite HTTP framework.
- Host: GitHub
- URL: https://github.com/progrium/httpfs
- Owner: progrium
- License: mit
- Created: 2024-04-18T00:29:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-05-01T20:42:27.000Z (8 months ago)
- Last Synced: 2024-06-19T11:34:53.781Z (6 months ago)
- Topics: filesystem, flask, fuse, golang, http
- Language: Go
- Homepage:
- Size: 20.5 KB
- Stars: 31
- Watchers: 4
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# httpfs
Create virtual filesystems using any HTTP framework.
```
$ tree ~/demo
/Users/progrium/demo
├── greet
│ ├── goodbye
│ └── hello
└── random2 directories, 3 files
```The file tree mounted at `~/demo` is powered by this Flask app:
```python
import os, random
from flask import Flask
from autodir import AutoDirMiddlewareapp = Flask(__name__)
AutoDirMiddleware(app)@app.get("/greet/hello")
def hello():
return "Hello, world!\n"@app.get("/greet/goodbye")
def goodbye():
return "Goodbye, world!\n"@app.get("/random")
def rnd():
return ''.join(random.choice('abcdefghijklmnopqrstuvwyz') for _ in range(24))+"\n"
```All it took was one command:
```
httpfs -mount ~/demo ./examples/flask-basic/app.py
```Don't care for Flask? Use any web framework!
## Install
Currently works on Linux and Mac (with [MacFUSE](https://osxfuse.github.io/)). Download from [latest release](https://github.com/progrium/httpfs/releases/latest) or you can run this installer:
```sh
bash -c "$(curl -sSL https://raw.githubusercontent.com/progrium/httpfs/main/install.sh)"
```Alternatively you can install using [Homebrew](https://brew.sh/):
```sh
brew tap progrium/homebrew-taps
brew install httpfs
```## Build an HTTP filesystem
Check out the [examples directory](examples) or read the [PROTOCOL.md](PROTOCOL.md) to see how it works.
## Roadmap
Full read-write and more coming soon. See our [roadmap](https://github.com/users/progrium/projects/2/views/1).
## License
MIT