webp3


Namewebp3 JSON
Version 1.0.0 PyPI version JSON
download
home_page
SummaryMusic player web app
upload_time2024-02-03 21:14:39
maintainer
docs_urlNone
author
requires_python>=3
license
keywords audio html5 music player server web
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # What is WebP3? (use case)

WebP3 is a humble web-app (server) to play your audio files remotely.

Typically, you host WebP3 on your personal home machine (or server) where your music files sit, and you can then listen to the music remotely at your workplace or on a handheld device in your browser.
It's designed for personal use.

No, there aren't any user-data-exploiting/social features and no, it's not hosted on some million-dollars cloud, it's hosted on your machine or your server.

## Design

WebP3 exposes a tree of folders and files that can be browsed through the web interface.
A few root directories are specified on the command-line to run WebP3, and all the content under those roots is simply exposed on the web interface, as there are no fine-grained permissions.

An HTML5 player allows to play the audio files from a requested dir.

It is designed to serve trees where a folder is an album (or contains other folders). ID3 is not necessary as it's not used.

![webp3 screenshot showing a list of files and the previous/pause/next buttons](screenshot.png)

### Audio format support

WebP3 doesn't use Flash and solely relies on HTML5's `<audio>` tag. So, audio file format support (like MP3) depends on your viewing browser and OS.

### JSON

When `application/json` mimetype is present in the `Accept` HTTP header, the listing of the browsed directory is returned in JSON format.

### M3U

When `audio/x-mpegurl` mimetype is present in the `Accept` HTTP header, or if the URL ends with `?m3u`, the listing of files the browsed directory is returned in M3U playlist format.
Thus, the URL can be given to an audio player like VLC.

## Usage

### Podman/Docker

WebP3 can be run as a container:

    podman build -t localhost/webp3 -f Containerfile
    podman run --rm -d -v /path/to/some/files:/media:ro -p 8000:8000 localhost/webp3

### Standalone server

First, run something like:

	webp3.py -p 8000 music=/path/to/some/files music2=/another/folder/to/share

The command will not terminate, the files are served as long as WebP3 is running.

Open <http://localhost:8000> to see (and play!) the music.

There will be 2 roots, /music and /music2, serving respectively the full content of /path/to/some/files and /another/folder/to/share.

Command-line flags:

	-p PORT

WebP3 will listen on port (default: 8000)

#### Single root

If it's not needed to have multiple roots, it's possible to run instead

    webp3.py -p 8000 --single-root /path/to/some/files

### WSGI

WebP3 can be set up to run as a WSGI app, for example to be served by an existing Apache instance.
When using WSGI, the mappings that were passed on command-line should now be placed in a `webp3.conf` file, with one `NAME=PATH` entry per line.

Using the documented script in the `apache` folder, the installation is as follows:

* the WebP3 code and WSGI is typically in a path like /usr/lib/python3/dist-packages/webp3
* the Apache configuration is in /etc/apache2/sites-available/webp3.conf
* the WebP3 config indicating the locations of the music files is at /etc/webp3.conf

Using an Apache instance to run the WebP3 WSGI allows:

* HTTPS
* serving the music tree under an URL prefix

If not using the default location, the config file can be passed in env variable `WEBP3_CONF`.

## Dependencies

WebP3 is written in Python 3 and uses:

* [Bottle web framework](https://bottlepy.org/)
* [Mako templates](https://www.makotemplates.org/)

## Security

WebP3 does not write files. However, it gives access to all files and folders contained in directories specified in its configuration.
Therefore, directory containing sensitive data should not be put in its configuration.

WebP3 does not have by itself any authentication mechanism to restrict access to its content.
If this is desired a proxy should be used, or access can be configured in an existing WSGI server (like Apache).

WebP3 reads files with the process' permissions. For example, if using WSGI, WebP3 will likely read files with the `www-data` user's permissions.
WebP3 does not follow symlinks.

## Install

On [PyPI](https://pypi.org/project/webp3/):

	pipx install webp3

## License

WebP3 is licensed under the [do What The Fuck you want Public License v2](https://wtfpl.net).

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "webp3",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3",
    "maintainer_email": "",
    "keywords": "audio,html5,music,player,server,web",
    "author": "",
    "author_email": "Hg <dev@indigo.re>",
    "download_url": "https://files.pythonhosted.org/packages/5c/50/106e7560f04a15d69b21ba4ccb12aae51d9e9d32b7d71737ea1f302e6103/webp3-1.0.0.tar.gz",
    "platform": null,
    "description": "# What is WebP3? (use case)\n\nWebP3 is a humble web-app (server) to play your audio files remotely.\n\nTypically, you host WebP3 on your personal home machine (or server) where your music files sit, and you can then listen to the music remotely at your workplace or on a handheld device in your browser.\nIt's designed for personal use.\n\nNo, there aren't any user-data-exploiting/social features and no, it's not hosted on some million-dollars cloud, it's hosted on your machine or your server.\n\n## Design\n\nWebP3 exposes a tree of folders and files that can be browsed through the web interface.\nA few root directories are specified on the command-line to run WebP3, and all the content under those roots is simply exposed on the web interface, as there are no fine-grained permissions.\n\nAn HTML5 player allows to play the audio files from a requested dir.\n\nIt is designed to serve trees where a folder is an album (or contains other folders). ID3 is not necessary as it's not used.\n\n![webp3 screenshot showing a list of files and the previous/pause/next buttons](screenshot.png)\n\n### Audio format support\n\nWebP3 doesn't use Flash and solely relies on HTML5's `<audio>` tag. So, audio file format support (like MP3) depends on your viewing browser and OS.\n\n### JSON\n\nWhen `application/json` mimetype is present in the `Accept` HTTP header, the listing of the browsed directory is returned in JSON format.\n\n### M3U\n\nWhen `audio/x-mpegurl` mimetype is present in the `Accept` HTTP header, or if the URL ends with `?m3u`, the listing of files the browsed directory is returned in M3U playlist format.\nThus, the URL can be given to an audio player like VLC.\n\n## Usage\n\n### Podman/Docker\n\nWebP3 can be run as a container:\n\n    podman build -t localhost/webp3 -f Containerfile\n    podman run --rm -d -v /path/to/some/files:/media:ro -p 8000:8000 localhost/webp3\n\n### Standalone server\n\nFirst, run something like:\n\n\twebp3.py -p 8000 music=/path/to/some/files music2=/another/folder/to/share\n\nThe command will not terminate, the files are served as long as WebP3 is running.\n\nOpen <http://localhost:8000> to see (and play!) the music.\n\nThere will be 2 roots, /music and /music2, serving respectively the full content of /path/to/some/files and /another/folder/to/share.\n\nCommand-line flags:\n\n\t-p PORT\n\nWebP3 will listen on port (default: 8000)\n\n#### Single root\n\nIf it's not needed to have multiple roots, it's possible to run instead\n\n    webp3.py -p 8000 --single-root /path/to/some/files\n\n### WSGI\n\nWebP3 can be set up to run as a WSGI app, for example to be served by an existing Apache instance.\nWhen using WSGI, the mappings that were passed on command-line should now be placed in a `webp3.conf` file, with one `NAME=PATH` entry per line.\n\nUsing the documented script in the `apache` folder, the installation is as follows:\n\n* the WebP3 code and WSGI is typically in a path like /usr/lib/python3/dist-packages/webp3\n* the Apache configuration is in /etc/apache2/sites-available/webp3.conf\n* the WebP3 config indicating the locations of the music files is at /etc/webp3.conf\n\nUsing an Apache instance to run the WebP3 WSGI allows:\n\n* HTTPS\n* serving the music tree under an URL prefix\n\nIf not using the default location, the config file can be passed in env variable `WEBP3_CONF`.\n\n## Dependencies\n\nWebP3 is written in Python 3 and uses:\n\n* [Bottle web framework](https://bottlepy.org/)\n* [Mako templates](https://www.makotemplates.org/)\n\n## Security\n\nWebP3 does not write files. However, it gives access to all files and folders contained in directories specified in its configuration.\nTherefore, directory containing sensitive data should not be put in its configuration.\n\nWebP3 does not have by itself any authentication mechanism to restrict access to its content.\nIf this is desired a proxy should be used, or access can be configured in an existing WSGI server (like Apache).\n\nWebP3 reads files with the process' permissions. For example, if using WSGI, WebP3 will likely read files with the `www-data` user's permissions.\nWebP3 does not follow symlinks.\n\n## Install\n\nOn [PyPI](https://pypi.org/project/webp3/):\n\n\tpipx install webp3\n\n## License\n\nWebP3 is licensed under the [do What The Fuck you want Public License v2](https://wtfpl.net).\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "Music player web app",
    "version": "1.0.0",
    "project_urls": {
        "Homepage": "https://gitlab.com/hydrargyrum/webp3"
    },
    "split_keywords": [
        "audio",
        "html5",
        "music",
        "player",
        "server",
        "web"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "dbc163f930da29bd38dae43c4a274ab3b4c20d57ef74dd62745de42d2f2fb338",
                "md5": "1225ec7de85f0bbd0aef00c9cc6c0603",
                "sha256": "d6467adef3a98e57666663f68374b234b5aee0d48e234ee93e87179f64943e77"
            },
            "downloads": -1,
            "filename": "webp3-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1225ec7de85f0bbd0aef00c9cc6c0603",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3",
            "size": 17176,
            "upload_time": "2024-02-03T21:14:37",
            "upload_time_iso_8601": "2024-02-03T21:14:37.879123Z",
            "url": "https://files.pythonhosted.org/packages/db/c1/63f930da29bd38dae43c4a274ab3b4c20d57ef74dd62745de42d2f2fb338/webp3-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5c50106e7560f04a15d69b21ba4ccb12aae51d9e9d32b7d71737ea1f302e6103",
                "md5": "9557f73b508746fb628bb804d69bec3a",
                "sha256": "4255b25313b6508a868bb2ce919c85899041b5b91dfcdb0623086955e54bf5b7"
            },
            "downloads": -1,
            "filename": "webp3-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9557f73b508746fb628bb804d69bec3a",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3",
            "size": 12702,
            "upload_time": "2024-02-03T21:14:39",
            "upload_time_iso_8601": "2024-02-03T21:14:39.130292Z",
            "url": "https://files.pythonhosted.org/packages/5c/50/106e7560f04a15d69b21ba4ccb12aae51d9e9d32b7d71737ea1f302e6103/webp3-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-02-03 21:14:39",
    "github": false,
    "gitlab": true,
    "bitbucket": false,
    "codeberg": false,
    "gitlab_user": "hydrargyrum",
    "gitlab_project": "webp3",
    "lcname": "webp3"
}
        
Elapsed time: 0.17950s