https://github.com/abichinger/vuefinder-wsgi
WSGI app to use PyFilesystem2 with vuefinder
https://github.com/abichinger/vuefinder-wsgi
Last synced: about 1 year ago
JSON representation
WSGI app to use PyFilesystem2 with vuefinder
- Host: GitHub
- URL: https://github.com/abichinger/vuefinder-wsgi
- Owner: abichinger
- License: mit
- Created: 2024-07-09T11:56:40.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-11-19T14:29:58.000Z (over 1 year ago)
- Last Synced: 2025-03-20T15:52:39.126Z (about 1 year ago)
- Language: Python
- Size: 17.5 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vuefinder-wsgi
[](https://pypi.org/project/vuefinder-wsgi/)
[](https://github.com/abichinger/vuefinder-wsgi/blob/main/LICENSE)
WSGI app for [vuefinder](https://github.com/n1crack/vuefinder). This is a vuefinder backend to access [PyFilesystem2](https://github.com/pyfilesystem/pyfilesystem2) filesystems.
# Unimplemented
- archive
- unarchive
# Installation
```sh
pip install vuefinder-wsgi
```
# Usage
```python
from vuefinder import VuefinderApp, fill_fs
from fs.memoryfs import MemoryFS
from werkzeug.serving import run_simple
if __name__ == "__main__":
# Initialize filesystem
memfs = MemoryFS()
fill_fs(
memfs,
{
"foo": {
"file.txt": "Hello World!",
"foo.txt": "foo bar baz",
"bar": {"baz": None},
},
"foobar": {"empty": None, "hello.txt": "Hello!"},
},
)
# Create and run the WSGI app
app = VuefinderApp(enable_cors=True)
app.add_fs("memory", memfs)
run_simple("127.0.0.1", 8005, app)
```