Package: effluxpy
The Advanced Browser and Streamer Python.DocumentationHead tohttp://jkabhishek.github.io/effluxpy/for an online version of
currentmasterdocumentation,You can also build yourself from sphinx sources using the documentationMakefilelocated atdocsdirectory.Screenshots[FeaturesSimple, like Python’s SimpleHTTPServer or Apache’s Directory
Listing.Downloadable directories, streaming directory tarballs on the
fly.Optional removefor files under given path.Optional uploadfor directories under given path.Playeraudio player plugin is provided (without transcoding).New in 0.5File and plugin APIs have been fully reworked making them more
complete and extensible, so they can be considered stable now. As a
side-effect backward compatibility on some edge cases could be broken
(please fill an issue if your code is affected).Old widget API have been deprecated and warnings will be shown if
used.Widget registration in a single call (passing a widget instances
is still available though), no more action-widget duality.Callable-based widget filtering (no longer limited to mimetypes).A raw HTML widget for maximum flexibility.Plugins can register command-line arguments now.Player plugin is now able to loadm3uandplsplaylists, and
optionally play everything on a directory (adding a command-line
argument).Browsing now takes full advantage ofscandir(already in Python
3.5 and an external dependency for older versions) providing faster
directory listing.Custom file ordering while browsing directories.Easy multi-file uploads.Jinja2 template output minification, saving those precious bytes.Setup script now registers a propereffluxpycommand.InstallIt is onpypi.pip install effluxpyYou can get the development version from ourgithub
repository.pip install git+https://github.com/jkabhishek/effluxpy.gitUsageServing $HOME/shared to all addresseseffluxpy 0.0.0.0 8080 --directory $HOME/sharedShowing helpeffluxpy --helpShowing help including player plugin argumentseffluxpy --plugin=player --helpThis examples assume python’sbindirectory is inPATH,
otherwise try replacingeffluxpywithpython-meffluxpy.Command-line argumentsThis is what is printed when you runeffluxpy--help, keep in mind
that plugins (loaded withpluginargument) could add extra arguments
to this list.usage: effluxpy [-h] [--directory PATH] [--initial PATH] [--removable PATH]
                [--upload PATH] [--exclude PATTERN] [--exclude-from PATH]
                [--plugin MODULE]
                [host] [port]

positional arguments:
  host                  address to listen (default: 127.0.0.1)
  port                  port to listen (default: 8080)

optional arguments:
  -h, --help            show this help message and exit
  --directory PATH      serving directory (default: current path)
  --initial PATH        default directory (default: same as --directory)
  --removable PATH      base directory allowing remove (default: none)
  --upload PATH         base directory allowing upload (default: none)
  --exclude PATTERN     exclude paths by pattern (multiple)
  --exclude-from PATH   exclude paths by pattern file (multiple)
  --plugin MODULE       load plugin module (multiple)Using as libraryIt’s a python module, so you can importeffluxpy, mountapp, and
serve it (it’sWSGI_ compliant) using your preferred server.effluxpy is a Flask application, so it can be served along with anyWSGI_ app just settingAPPLICATION_ROOTineffluxpy.appconfig to effluxpy prefix url, and mountingeffluxpy.appon the
appropriate parenturl-resolver/router._WSGIeffluxpy app config (available at :attr:effluxpy.app.config) uses
the following configuration options.directory_base: anything under this directory will be served,
defaults to current path.directory_start: directory will be served when accessing root URLdirectory_remove: file removing will be available under this
path, defaults toNone.directory_upload: file upload will be available under this path,
defaults toNone.directory_tar_buffsize, directory tar streaming buffer size,
defaults to262144and must be multiple of 512.directory_downloadablewhether enable directory download or not,
defaults toTrue.use_binary_multipleswhether use binary units (bi-bytes, like
KiB) instead of common ones (bytes, like KB), defaults toTrue.plugin_moduleslist of module names (absolute or relative to
plugin_namespaces) will be loaded.plugin_namespacesprefixes for module names listed at
plugin_modules where relative plugin_modules are searched.exclude_fncfunction will be used to exclude files from listing
and directory tarballs. Can be either None or function receiving an
absolute path and returning a boolean.After editingplugin_modulesvalue, plugin manager (available at
module plugin_manager and app.extensions[‘plugin_manager’]) should be
reloaded using thereloadmethod.The other way of loading a plugin programmatically is calling plugin
manager’sload_pluginmethod.Extend via plugin APIStarting from version 0.4.0, effluxpy is extensible via plugins. A
functional ‘player’ plugin is provided as example, and some more are
planned.Plugins can add HTML content to effluxpy’s browsing view, using some
convenience abstraction for already used elements like external
stylesheet and javascript tags, links, buttons and file upload.More information athttp://jkabhishek.github.io/effluxpy/plugins.html