GithubHelp home page GithubHelp logo

progrium / httpfs Goto Github PK

View Code? Open in Web Editor NEW
31.0 4.0 2.0 21 KB

Create filesystems using your favorite HTTP framework.

License: MIT License

Go 84.59% Makefile 1.47% Shell 13.94%
filesystem flask fuse http golang

httpfs's Introduction

httpfs

Create virtual filesystems using any HTTP framework.

$ tree ~/demo
/Users/progrium/demo
├── greet
│   ├── goodbye
│   └── hello
└── random

2 directories, 3 files

The file tree mounted at ~/demo is powered by this Flask app:

import os, random
from flask import Flask
from autodir import AutoDirMiddleware

app = 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). Download from latest release or you can run this installer:

bash -c "$(curl -sSL https://raw.githubusercontent.com/progrium/httpfs/main/install.sh)"

Alternatively you can install using Homebrew:

brew tap progrium/homebrew-taps
brew install httpfs

Build an HTTP filesystem

Check out the examples directory or read the PROTOCOL.md to see how it works.

Roadmap

Full read-write and more coming soon. See our roadmap.

License

MIT

httpfs's People

Contributors

progrium avatar gmlewis avatar

Stargazers

Mike DuPont avatar Kevin Butler avatar スコット avatar Steven Murr avatar Joel Van Eenwyk avatar  avatar  avatar Ryuta Suzuki avatar Dario Vladović avatar Rok Fajfar avatar Oleg Pykhalov avatar 周丰 avatar Paulo Freitas avatar terrifictable avatar Rob Fulwell avatar Tim Kersey avatar Recai Oktaş avatar Johan Siebens avatar Steve Freeman avatar Selman Kayrancioglu avatar  avatar Pradeep Elankumaran avatar David A avatar Christian Korneck avatar Guo Jia avatar  avatar Rinor Hoxha avatar Roman Nestertsov avatar Ishan Marikar avatar Gonçalo Mendes Cabrita avatar  avatar

Watchers

 avatar Tobias Bradtke avatar Rinor Hoxha avatar Christian Korneck avatar

Forkers

gmlewis loteks

httpfs's Issues

Example not working on Mac M2 Max Sonoma 14.4.1

I tried the Flask example locally, and get:

$ httpfs -mount ~/demo ./examples/flask-basic/app.py
2024/04/19 09:03:27 unable to stat httpfs: Head "http://localhost:59353/": dial tcp 127.0.0.1:59353: connect: connection refused

I don't know much about Flask. It might be nice to bundle a Go example as well.

I'm running on a Mac M2 Max with Sonoma 14.4.1.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.