Skip to main content

Python module to, auto initialize and run filebrowser

Project description

Deployments

book pypi none-shall-pass

PyPI version shields.io Pypi-format Pypi-status

PyFileBrowser

Automatic initializer for filebrowser

The primary purpose of this repository is to make the installation and configuration of filebrowser painless.
All the required configuration, settings, and user profiles are loaded using .env files.

Environment Variables

Env vars can either be loaded from .env files or directly passed during object init.

.env files

  • .config.env - Loads the server's default configuration. Reference: config vars
  • .user*.env - Loads each user's profile specific configuration. Reference: user vars

Multiple user profiles can be loaded using .user1.env, .user2.env and so on.
User profile's permissions are automatically set based on the admin flag.

:warning:  Any configuration changes made in the UI will be lost, unless backed up manually.
Changes should always go through the .env files.

[OR]

from pyfilebrowser import FileBrowser

if __name__ == '__main__':
    file_browser = FileBrowser(
        user_profiles=[
            {"authentication": {"username": "admin", "password": "admin", "admin": True}},
            {"authentication": {"username": "user123", "password": "pwd456", "admin": False}}
        ]
    )
    file_browser.kickoff()

:bulb:  Object level instantiation might be complex for configuration settings. So it is better to use .env files instead.

Linting

pre-commit will ensure linting, run pytest, generate runbook & release notes, and validate hyperlinks in ALL markdown files (including Wiki pages)

Requirement

pip install sphinx==5.1.1 pre-commit recommonmark

Usage

pre-commit run --all-files

Pypi Package

pypi-module

https://pypi.org/project/pyfilebrowser/

Runbook

made-with-sphinx-doc

https://thevickypedia.github.io/pyfilebrowser/

License & copyright

© Vignesh Rao

Licensed under the MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

pyfilebrowser-0.0.1-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page