fileware


Namefileware JSON
Version 1.3 PyPI version JSON
download
home_page
SummaryPython module to, serve files in physical memory to localhost and tunnel to a public endpoint
upload_time2023-11-13 23:24:07
maintainer
docs_urlNone
author
requires_python>=3.8
licenseMIT License Copyright (c) 2021 Vignesh Sivanandha 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 personal-cloud file-server ssl
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            **Versions Supported**

![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)

**Language Stats**

![Language count](https://img.shields.io/github/languages/count/thevickypedia/fileware)
![Code coverage](https://img.shields.io/github/languages/top/thevickypedia/fileware)

**Repo Stats**

[![GitHub](https://img.shields.io/github/license/thevickypedia/fileware)](https://github.com/thevickypedia/fileware/blob/main/LICENSE)
[![GitHub repo size](https://img.shields.io/github/repo-size/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)
[![GitHub code size](https://img.shields.io/github/languages/code-size/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)

**Code Stats**

![Modules](https://img.shields.io/github/search/thevickypedia/fileware/module)
![Python](https://img.shields.io/github/search/thevickypedia/fileware/.py)

**Activity**

[![GitHub Repo created](https://img.shields.io/date/1618966420)](https://api.github.com/repos/thevickypedia/fileware)
[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)
[![GitHub last commit](https://img.shields.io/github/last-commit/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)

**Build Status**

[![pypi-publish](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml)
[![pages-build-deployment](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment)

# FileWare
Set up a file server to access files in local machine from anywhere on the internet.

### Setup
**Environment Variables:**

- `username`: Username to confirm identity. Defaults to user profile name.
- `password`: Password for authentication.
- `port`: Port number to serve. Defaults to `4443`.
- `host_path`: Path which is to be hosted. Defaults to `home` page.

**To host on a public facing URL:**
- `ngrok_auth`: Ngrok token.

### Usage

```shell
python3 -m pip install fileware
```

**With Threading**
```python
from threading import Thread

import fileware


fileware.models.env.port = 4568
fileware.models.env.host_dir = "movies"


if __name__ == '__main__':
    # Initiates the connection and creates a new process if ngrok auth token is valid.
    response = fileware.initiate_connection()
    print(response.url)

    # Runs the server in a thread alongside starting the ngrok process created previously.
    thread = Thread(target=fileware.serve,
                    kwargs={'http_server': response.server, 'process': response.process})
    thread.start()

    # Do your own task here

    # Shutdown the server and join the thread which spun the server up.
    fileware.shutdown(http_server=response.server, process=response.process)
    thread.join(2e+1)
```

**Without Threading - File Server will terminate only when the main process is killed.**
```python
import fileware


if __name__ == '__main__':
    response = fileware.initiate_connection()
    print(response.url)
    fileware.serve(http_server=response.server,process=response.process)
```

> Env vars can be loaded by placing a .env file in current working directory.
>
> The `serve` function can also take arguments which can be used to override env vars.

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

[https://pypi.org/project/fileware/](https://pypi.org/project/fileware/)

## Coding Standards
Docstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) <br>
Styling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/) <br>
Clean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and
[`isort`](https://pycqa.github.io/isort/)

## Linting
`PreCommit` will ensure linting, and the doc creation are run on every commit.

**Requirement**
<br>
```shell
pip install --no-cache pre-commit recommonmark sphinx==5.1.1
```

**Usage**
<br>
```shell
pre-commit run --all-files
```

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

[https://pypi.org/project/fileware/](https://pypi.org/project/fileware/)

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

[https://thevickypedia.github.io/fileware/](https://thevickypedia.github.io/fileware/)

## License & copyright

&copy; Vignesh Rao

Licensed under the [MIT License](https://github.com/thevickypedia/fileware/blob/main/LICENSE)

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "fileware",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "personal-cloud,file-server,ssl",
    "author": "",
    "author_email": "Vignesh Rao <svignesh1793@gmail.com>",
    "download_url": "",
    "platform": null,
    "description": "**Versions Supported**\n\n![Python](https://img.shields.io/badge/python-3.8%20%7C%203.9%20%7C%203.10%20%7C%203.11-blue)\n\n**Language Stats**\n\n![Language count](https://img.shields.io/github/languages/count/thevickypedia/fileware)\n![Code coverage](https://img.shields.io/github/languages/top/thevickypedia/fileware)\n\n**Repo Stats**\n\n[![GitHub](https://img.shields.io/github/license/thevickypedia/fileware)](https://github.com/thevickypedia/fileware/blob/main/LICENSE)\n[![GitHub repo size](https://img.shields.io/github/repo-size/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)\n[![GitHub code size](https://img.shields.io/github/languages/code-size/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)\n\n**Code Stats**\n\n![Modules](https://img.shields.io/github/search/thevickypedia/fileware/module)\n![Python](https://img.shields.io/github/search/thevickypedia/fileware/.py)\n\n**Activity**\n\n[![GitHub Repo created](https://img.shields.io/date/1618966420)](https://api.github.com/repos/thevickypedia/fileware)\n[![GitHub commit activity](https://img.shields.io/github/commit-activity/y/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)\n[![GitHub last commit](https://img.shields.io/github/last-commit/thevickypedia/fileware)](https://api.github.com/repos/thevickypedia/fileware)\n\n**Build Status**\n\n[![pypi-publish](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/python-publish.yml)\n[![pages-build-deployment](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment/badge.svg)](https://github.com/thevickypedia/gmail-connector/actions/workflows/pages/pages-build-deployment)\n\n# FileWare\nSet up a file server to access files in local machine from anywhere on the internet.\n\n### Setup\n**Environment Variables:**\n\n- `username`: Username to confirm identity. Defaults to user profile name.\n- `password`: Password for authentication.\n- `port`: Port number to serve. Defaults to `4443`.\n- `host_path`: Path which is to be hosted. Defaults to `home` page.\n\n**To host on a public facing URL:**\n- `ngrok_auth`: Ngrok token.\n\n### Usage\n\n```shell\npython3 -m pip install fileware\n```\n\n**With Threading**\n```python\nfrom threading import Thread\n\nimport fileware\n\n\nfileware.models.env.port = 4568\nfileware.models.env.host_dir = \"movies\"\n\n\nif __name__ == '__main__':\n    # Initiates the connection and creates a new process if ngrok auth token is valid.\n    response = fileware.initiate_connection()\n    print(response.url)\n\n    # Runs the server in a thread alongside starting the ngrok process created previously.\n    thread = Thread(target=fileware.serve,\n                    kwargs={'http_server': response.server, 'process': response.process})\n    thread.start()\n\n    # Do your own task here\n\n    # Shutdown the server and join the thread which spun the server up.\n    fileware.shutdown(http_server=response.server, process=response.process)\n    thread.join(2e+1)\n```\n\n**Without Threading - File Server will terminate only when the main process is killed.**\n```python\nimport fileware\n\n\nif __name__ == '__main__':\n    response = fileware.initiate_connection()\n    print(response.url)\n    fileware.serve(http_server=response.server,process=response.process)\n```\n\n> Env vars can be loaded by placing a .env file in current working directory.\n>\n> The `serve` function can also take arguments which can be used to override env vars.\n\n### Pypi Package\n[![pypi-module](https://img.shields.io/badge/Software%20Repository-pypi-1f425f.svg)](https://packaging.python.org/tutorials/packaging-projects/)\n\n[https://pypi.org/project/fileware/](https://pypi.org/project/fileware/)\n\n## Coding Standards\nDocstring format: [`Google`](https://google.github.io/styleguide/pyguide.html#38-comments-and-docstrings) <br>\nStyling conventions: [`PEP 8`](https://www.python.org/dev/peps/pep-0008/) <br>\nClean code with pre-commit hooks: [`flake8`](https://flake8.pycqa.org/en/latest/) and\n[`isort`](https://pycqa.github.io/isort/)\n\n## Linting\n`PreCommit` will ensure linting, and the doc creation are run on every commit.\n\n**Requirement**\n<br>\n```shell\npip install --no-cache pre-commit recommonmark sphinx==5.1.1\n```\n\n**Usage**\n<br>\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)](https://packaging.python.org/tutorials/packaging-projects/)\n\n[https://pypi.org/project/fileware/](https://pypi.org/project/fileware/)\n\n## Runbook\n[![made-with-sphinx-doc](https://img.shields.io/badge/Code%20Docs-Sphinx-1f425f.svg)](https://www.sphinx-doc.org/en/master/man/sphinx-autogen.html)\n\n[https://thevickypedia.github.io/fileware/](https://thevickypedia.github.io/fileware/)\n\n## License & copyright\n\n&copy; Vignesh Rao\n\nLicensed under the [MIT License](https://github.com/thevickypedia/fileware/blob/main/LICENSE)\n",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) 2021 Vignesh Sivanandha 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 to, serve files in physical memory to localhost and tunnel to a public endpoint",
    "version": "1.3",
    "project_urls": {
        "Bug Tracker": "https://github.com/thevickypedia/fileware/issues",
        "Docs": "https://thevickypedia.github.io/fileware",
        "Homepage": "https://github.com/thevickypedia/fileware",
        "Release Notes": "https://github.com/thevickypedia/fileware/blob/main/release_notes.rst",
        "Source": "https://github.com/thevickypedia/fileware"
    },
    "split_keywords": [
        "personal-cloud",
        "file-server",
        "ssl"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "49d154cd69c68fe348fd6eb62f3394b5c228544215b22708cb67321a871a360e",
                "md5": "9c41d293e1bfe57a7b19d0aca413ed4b",
                "sha256": "37bb0784d14fd60ed7a252c8259a8a4730f48797faa3ff3edfac0c008fdccbf4"
            },
            "downloads": -1,
            "filename": "fileware-1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9c41d293e1bfe57a7b19d0aca413ed4b",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 23949,
            "upload_time": "2023-11-13T23:24:07",
            "upload_time_iso_8601": "2023-11-13T23:24:07.368475Z",
            "url": "https://files.pythonhosted.org/packages/49/d1/54cd69c68fe348fd6eb62f3394b5c228544215b22708cb67321a871a360e/fileware-1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-13 23:24:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thevickypedia",
    "github_project": "fileware",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "fileware"
}
        
Elapsed time: 0.13924s