pyfilebrowser


Namepyfilebrowser JSON
Version 0.0.8 PyPI version JSON
download
home_pageNone
SummaryPython module designed to streamline interactions with filebrowser
upload_time2024-04-05 10:09:32
maintainerNone
docs_urlNone
authorNone
requires_python>=3.11
licenseMIT License Copyright (c) 2024 Vignesh Rao Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords filebrowser pydantic python-dotenv
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **Deployments**

![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)

[![book][gha_pages_badge]][gha_pages]
[![pypi][gha_pypi_badge]][gha_pypi]

[![none-shall-pass][gha_none_shall_pass_badge]][gha_none_shall_pass]
[![Delete old workflow runs][gha_cleanup_workflows_badge]][gha_cleanup_workflows]

[![PyPI version shields.io](https://img.shields.io/pypi/v/pyfilebrowser)][pypi]
[![Pypi-format](https://img.shields.io/pypi/format/pyfilebrowser)](https://pypi.org/project/pyfilebrowser/#files)
[![Pypi-status](https://img.shields.io/pypi/status/pyfilebrowser)][pypi]

# PyFileBrowser
Introducing [`pyfilebrowser`][repo], a Python library designed to streamline interactions with [filebrowser][home]<br>

This wrapper simplifies integration and automation tasks, enabling seamless interaction with your local file system via
filebrowser's web interface.

All the required configuration, settings, and user profiles are loaded using `.env` files. This provides a more centralized
way of handling the configuration and initialization.

[`pyfilebrowser`][repo] automatically downloads the system specific executable during startup.

<details>
<summary><strong>Download custom-built executables</strong></summary>
<br>

Additionally, custom source _(to download binaries)_ can be configured by specifying the environment variables,
`GIT_OWNER` and `GIT_REPO`<br>
For this custom source feature to work, the executable should be uploaded to releases as assets,
and follow the naming convention below.

> **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`<br>
> **example:** `darwin-amd64-filebrowser.tar.gz`

</details>

## Kick Off
**Install**
```shell
python -m pip install pyfilebrowser
```

**Initiate**
```python
import pyfilebrowser


if __name__ == '__main__':
    browser = pyfilebrowser.FileBrowser()
    browser.start()
```

## 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]
- `.user*.env` - Loads each user's profile specific configuration. Reference: [users]

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

Refer [samples] directory for sample `.env` files. For nested configuration settings, refer the [runbook]

> Any configuration changes made in the UI will be lost, unless backed up manually.<br>
> Changes should always go through the `.env` files.

**[OR]**

```python
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.start()
```

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

## Coding Standards
Docstring format: [`Google`][google-docs] <br>
Styling conventions: [`PEP 8`][pep8] and [`isort`][isort]

## [Release Notes][release-notes]
**Requirement**
```shell
pip install gitverse
```

**Usage**
```shell
gitverse-release reverse -f release_notes.rst -t 'Release Notes'
```

## Linting
`pre-commit` will ensure linting, and generate runbook

**Requirement**
```shell
pip install sphinx==5.1.1 pre-commit recommonmark
```

**Usage**
```shell
pre-commit run --all-files
```

## Pypi Package
[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)][pypi-repo]

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

## Runbook
[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)][sphinx]

[https://thevickypedia.github.io/pyfilebrowser/][runbook]

## License & copyright

&copy; Vignesh Rao

Licensed under the [MIT License][license]

[repo]: https://github.com/thevickypedia/pyfilebrowser
[samples]: https://github.com/thevickypedia/pyfilebrowser/tree/main/samples
[license]: https://github.com/thevickypedia/pyfilebrowser/blob/main/LICENSE
[config]: https://thevickypedia.github.io/pyfilebrowser/#configuration
[users]: https://thevickypedia.github.io/pyfilebrowser/#users
[home]: https://filebrowser.org/
[pypi]: https://pypi.org/project/pyfilebrowser
[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/
[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html
[runbook]: https://thevickypedia.github.io/pyfilebrowser/
[gha_pages]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/pages/pages-build-deployment
[gha_pages_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/pages/pages-build-deployment/badge.svg
[gha_pypi]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/python-publish.yml
[gha_pypi_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/python-publish.yml/badge.svg
[gha_none_shall_pass]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml
[gha_none_shall_pass_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml/badge.svg
[gha_cleanup_workflows]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml
[gha_cleanup_workflows_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml/badge.svg
[release-notes]: https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst
[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings
[pep8]: https://www.python.org/dev/peps/pep-0008/
[isort]: https://pycqa.github.io/isort/

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pyfilebrowser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.11",
    "maintainer_email": null,
    "keywords": "filebrowser, pydantic, python-dotenv",
    "author": null,
    "author_email": "Vignesh Rao <svignesh1793@gmail.com>",
    "download_url": null,
    "platform": null,
    "description": "**Deployments**\n\n![Python](https://img.shields.io/badge/python-3.11%20%7C%203.12-blue)\n\n[![book][gha_pages_badge]][gha_pages]\n[![pypi][gha_pypi_badge]][gha_pypi]\n\n[![none-shall-pass][gha_none_shall_pass_badge]][gha_none_shall_pass]\n[![Delete old workflow runs][gha_cleanup_workflows_badge]][gha_cleanup_workflows]\n\n[![PyPI version shields.io](https://img.shields.io/pypi/v/pyfilebrowser)][pypi]\n[![Pypi-format](https://img.shields.io/pypi/format/pyfilebrowser)](https://pypi.org/project/pyfilebrowser/#files)\n[![Pypi-status](https://img.shields.io/pypi/status/pyfilebrowser)][pypi]\n\n# PyFileBrowser\nIntroducing [`pyfilebrowser`][repo], a Python library designed to streamline interactions with [filebrowser][home]<br>\n\nThis wrapper simplifies integration and automation tasks, enabling seamless interaction with your local file system via\nfilebrowser's web interface.\n\nAll the required configuration, settings, and user profiles are loaded using `.env` files. This provides a more centralized\nway of handling the configuration and initialization.\n\n[`pyfilebrowser`][repo] automatically downloads the system specific executable during startup.\n\n<details>\n<summary><strong>Download custom-built executables</strong></summary>\n<br>\n\nAdditionally, custom source _(to download binaries)_ can be configured by specifying the environment variables,\n`GIT_OWNER` and `GIT_REPO`<br>\nFor this custom source feature to work, the executable should be uploaded to releases as assets,\nand follow the naming convention below.\n\n> **asset naming convention:** `${operating system}-{architecture}-filebrowser-{extension}`<br>\n> **example:** `darwin-amd64-filebrowser.tar.gz`\n\n</details>\n\n## Kick Off\n**Install**\n```shell\npython -m pip install pyfilebrowser\n```\n\n**Initiate**\n```python\nimport pyfilebrowser\n\n\nif __name__ == '__main__':\n    browser = pyfilebrowser.FileBrowser()\n    browser.start()\n```\n\n## Environment Variables\nEnv vars can either be loaded from `.env` files or directly passed during object init.\n\n#### `.env` files\n\n- `.config.env` - Loads the server's default configuration. Reference: [config]\n- `.user*.env` - Loads each user's profile specific configuration. Reference: [users]\n\nMultiple user profiles can be loaded using `.user1.env`, `.user2.env` and so on.<br>\nUser profile's permissions are automatically set based on the `admin` flag.\n\nRefer [samples] directory for sample `.env` files. For nested configuration settings, refer the [runbook]\n\n> Any configuration changes made in the UI will be lost, unless backed up manually.<br>\n> Changes should always go through the `.env` files.\n\n**[OR]**\n\n```python\nfrom pyfilebrowser import FileBrowser\n\nif __name__ == '__main__':\n    file_browser = FileBrowser(\n        user_profiles=[\n            {\"authentication\": {\"username\": \"admin\", \"password\": \"admin\", \"admin\": True}},\n            {\"authentication\": {\"username\": \"user123\", \"password\": \"pwd456\", \"admin\": False}}\n        ]\n    )\n    file_browser.start()\n```\n\n> Object level instantiation might be complex for configuration settings. So it is better to use `.env` files instead.\n\n## Coding Standards\nDocstring format: [`Google`][google-docs] <br>\nStyling conventions: [`PEP 8`][pep8] and [`isort`][isort]\n\n## [Release Notes][release-notes]\n**Requirement**\n```shell\npip install gitverse\n```\n\n**Usage**\n```shell\ngitverse-release reverse -f release_notes.rst -t 'Release Notes'\n```\n\n## Linting\n`pre-commit` will ensure linting, and generate runbook\n\n**Requirement**\n```shell\npip install sphinx==5.1.1 pre-commit recommonmark\n```\n\n**Usage**\n```shell\npre-commit run --all-files\n```\n\n## Pypi Package\n[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)][pypi-repo]\n\n[https://pypi.org/project/pyfilebrowser/][pypi]\n\n## Runbook\n[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)][sphinx]\n\n[https://thevickypedia.github.io/pyfilebrowser/][runbook]\n\n## License & copyright\n\n&copy; Vignesh Rao\n\nLicensed under the [MIT License][license]\n\n[repo]: https://github.com/thevickypedia/pyfilebrowser\n[samples]: https://github.com/thevickypedia/pyfilebrowser/tree/main/samples\n[license]: https://github.com/thevickypedia/pyfilebrowser/blob/main/LICENSE\n[config]: https://thevickypedia.github.io/pyfilebrowser/#configuration\n[users]: https://thevickypedia.github.io/pyfilebrowser/#users\n[home]: https://filebrowser.org/\n[pypi]: https://pypi.org/project/pyfilebrowser\n[pypi-repo]: https://packaging.python.org/tutorials/packaging-projects/\n[sphinx]: https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html\n[runbook]: https://thevickypedia.github.io/pyfilebrowser/\n[gha_pages]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/pages/pages-build-deployment\n[gha_pages_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/pages/pages-build-deployment/badge.svg\n[gha_pypi]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/python-publish.yml\n[gha_pypi_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/python-publish.yml/badge.svg\n[gha_none_shall_pass]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml\n[gha_none_shall_pass_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/markdown.yml/badge.svg\n[gha_cleanup_workflows]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml\n[gha_cleanup_workflows_badge]: https://github.com/thevickypedia/pyfilebrowser/actions/workflows/cleanup.yml/badge.svg\n[release-notes]: https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst\n[google-docs]: https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings\n[pep8]: https://www.python.org/dev/peps/pep-0008/\n[isort]: https://pycqa.github.io/isort/\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2024 Vignesh Rao  Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:  The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.  THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
    "summary": "Python module designed to streamline interactions with filebrowser",
    "version": "0.0.8",
    "project_urls": {
        "Bug Tracker": "https://github.com/thevickypedia/pyfilebrowser/issues",
        "Docs": "https://thevickypedia.github.io/pyfilebrowser/",
        "Homepage": "https://github.com/thevickypedia/pyfilebrowser",
        "Release Notes": "https://github.com/thevickypedia/pyfilebrowser/blob/main/release_notes.rst",
        "Source": "https://github.com/thevickypedia/pyfilebrowser"
    },
    "split_keywords": [
        "filebrowser",
        " pydantic",
        " python-dotenv"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9972c5f8c2b9b59f8cfb2c0de455782ed6f188f22e58fcb1b9b14cb26286a7ed",
                "md5": "fe7c16cc9042460e3a535fca0a406a24",
                "sha256": "7f33a4a8674f89612640eb7441c85dcaf223f3262af6d6bdea1d387c64514567"
            },
            "downloads": -1,
            "filename": "pyfilebrowser-0.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "fe7c16cc9042460e3a535fca0a406a24",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 17046,
            "upload_time": "2024-04-05T10:09:32",
            "upload_time_iso_8601": "2024-04-05T10:09:32.393802Z",
            "url": "https://files.pythonhosted.org/packages/99/72/c5f8c2b9b59f8cfb2c0de455782ed6f188f22e58fcb1b9b14cb26286a7ed/pyfilebrowser-0.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-05 10:09:32",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thevickypedia",
    "github_project": "pyfilebrowser",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "pyfilebrowser"
}
        
Elapsed time: 0.28287s