tdwnsv3


Nametdwnsv3 JSON
Version 1.9.5 PyPI version JSON
download
home_pagehttps://github.com/Simatwa/tdwnsv3
SummarySimple local-files server with security on top!
upload_time2023-12-22 10:46:00
maintainerSmartwa Caleb
docs_urlNone
authorSmartwa Caleb
requires_python
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">tdwnsv3</h1>



<p align="center">

<a href="https://github.com/Simatwa/tdwnsv3"><img src="https://img.shields.io/static/v1?label=Github&message=Passing&logo=github&color=green" alt="Github"/></a>

<a href="https://pypi.org/project/tdwnsv3"><img src="https://img.shields.io/static/v1?label=Pypi&message=v1.9.5&color=yellow&logo=pypi" alt="pypi"/></a>

<a href="#"><img src="https://img.shields.io/static/v1?label=Coverage&message=80%&color=lime&logo=Coverage" alt="Coverage"/></a>

<a href="https://wakatime.com/badge/github/Simatwa/svinf3"><img src="https://wakatime.com/badge/github/Simatwa/svinf3.svg" alt="wakatime"/></a>

<a href="https://pepy.tech/project/tdwnsv3"><img src="https://static.pepy.tech/badge/tdwnsv3" alt="Downloads"/></a>

<a href="#"><img src="https://visitor-badge.glitch.me/badge?page_id=Simatwa.tdwnsv3&left_color=red&right_color=lime&left_text=Counts" alt="Visitors"/></a>

<a href="#"><img src="https://img.shields.io/static/v1?label=Code Style&message=Black&color=black&logo=Black" alt="Code-style"/></a>

</p>



> Access your files on the web.



![Web interface sample](https://github.com/Simatwa/tdwnsv3/raw/main/assets/web_interface_example.gif)



## [Independencies](https://github.com/Simatwa/tdwnsv3/raw/main/requirements.txt)



* Flask

* cryptography

* appdirs



## Features



- Simple commandline interface

- Web interface with multiple themes

- Serve as static files server - index.html

- Highly immune against variety of attacks

- Compatible with multiple devices and browsers

- Fully customizable web interface - css

- Upload and download files

- Delete multiple files with a click



## Installation 



- Choose your suit from the following ways:



1. From pip 

  

  ```sh

  $ pip install tdwnsv3

  ```



2. From source



 ```sh

 $ pip install git+https://github.com/Simatwa/tdwnsv3.git

 ```



 3. Cloning repo and install



  ```sh

  git clone https://github.com/Simatwa/tdwnsv3.git

  cd tdwnsv3

  sudo bash install.sh

  ```





## Usage ##



Either of the following ways will get you ready at the terminal environment



1. Package level

```

$ python -m tdwnsv3

```

2. `$ tdwnsv3`



<p align="center">By default, the server fires up with the following configurations:</p>



<table align='center'>

<thead>

<tr><th>Command  </th><th style="text-align: right;">  Default</th></tr>

</thead>

<tbody>

<tr><td>host     </td><td style="text-align: right;">    False</td></tr>

<tr><td>port     </td><td style="text-align: right;">     8000</td></tr>

<tr><td>no-sort     </td><td style="text-align: right;">   False</td></tr>

<tr><td>theme    </td><td style="text-align: right;">        3</td></tr>

<tr><td>upload   </td><td style="text-align: right;">    False</td></tr>

<tr><td>encrypt  </td><td style="text-align: right;">    False</td></tr>

<tr><td>session  </td><td style="text-align: right;">    False</td></tr>

</tbody>

</table>



> **Note** This is just a shallow display of the default configurations.



## wsgi 



Since Flask server runs at development environment, you may need to run the program on a server such as [Nginx](https://nginx.org) for efficiency.



```py

from tdwnsv3.tdwnsv3 import app



if __name__ == "__main__":

    app.run()

```



The [wsgi.py](https://github.com/Simatwa/tdwnsv3/raw/main/wsgi.py) script can be interfaced with **wsgi** such as **uwsgi** to run behind a *server* .

 * For  instance intergrating with `uwsgi` as stated in [docs](https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html) :

 

 ```



$ uwsgi --http=0.0.0.0:8080 -w wsgi:app



```



<details>



<summary>



- Run  ```tdwnsv3 -h``` to view more configuration info as shown.



</summary>



```



usage: tdwnsv3 [-h] [-v] [-d DIR] [-a ALLOW] [-r RESTRICT] [-w WHITELIST]

               [-b BLACKLIST] [-t SPLIT] [-s 1 to 10] [-l 1 to 5] [-o LOG]

               [-ho HOME] [-st STATIC] [-up RECEIVE] [-se SESSION] [-th [1-3]]

               [-cs CSS] [-upp UPLOAD_PATH] [-upe UPLOAD_EXTENSION]

               [-ups UPLOAD_SIZE] [-upl upload_limit] [--upload-multiple]

               [--disable-aggressive] [--display-hidden] [--host] [--no-sort]

               [--view] [--strict] [--preload] [--upload] [--save-css]

               [--no-cache] [--encrypt] [--debug] [--index]

               [port]



Simple local-files server with security on top!



positional arguments:

  port                  Port to be used for hosting files



options:

  -h, --help            show this help message and exit

  -v, --version         show program's version number and exit

  -d DIR, --dir DIR     Directory to be hosted

  -a ALLOW, --allow ALLOW

                        Host only certain entries

  -r RESTRICT, --restrict RESTRICT

                        Hide entries from being viewed

  -w WHITELIST, --whitelist WHITELIST

                        IP(s) to be excluded from restrictions - default :

                        None

  -b BLACKLIST, --brownlist BLACKLIST

                        IP(s) to be imposed the restrictions - default : all

  -t SPLIT, --split SPLIT

                        Separator for the entries allowed/restricted - default

                        [,]

  -s 1 to 10, --secure 1 to 10

                        Level of security on contents

  -l 1 to 5, --level 1 to 5

                        Logging level

  -o LOG, --log LOG     Filepath to log to

  -ho HOME, --home HOME

                        Home host subdomain path

  -st STATIC, --static STATIC

                        Static host subdomain path

  -up RECEIVE, --receive RECEIVE

                        Upload host subdomain path

  -se SESSION, --session SESSION

                        Maximum session time per user - (mins)

  -th [1-3], --theme [1-3]

                        Theme for displaying contents

  -cs CSS, --css CSS    Customize webpage with the CSS in path

  -upp UPLOAD_PATH, --upload-path UPLOAD_PATH

                        Path for saving uploaded files

  -upe UPLOAD_EXTENSION, --upload-extension UPLOAD_EXTENSION

                        Extensions of files to be uploaded

  -ups UPLOAD_SIZE, --upload-size UPLOAD_SIZE

                        Maximum file size to be uploaded - [MB]

  -upl upload_limit, --upload-limit-person upload_limit

                        Maximum files to be uploaded per IP

  --upload-multiple     Allow users to upload more than one file at a time.

  --disable-aggressive  Not to - Filter all entries with the restricted

                        keywords +

  --display-hidden      Show hidden files and directories

  --host                Host the files on the LAN

  --no-sort             Disable prettifying the display of contents

  --view                Files can be seen but can't be downloaded

  --strict              Only allow whitelisted & brownlisted IPs to access

                        server!

  --preload             Load videos before clicked

  --upload              Allow users to upload files

  --save-css            Saves the css data in path for future use

  --no-cache            Use currently passed parameters not previously saved;

                        content-caching disabled

  --encrypt             Encrypt URIs on the webpage

  --debug               Debug the web application in UI mode

  --index               Serve from index.html file



```



</details>



- Review [CHANGELOG](CHANGELOG.md)



## Acknowledgements



* [x] [Flask](https://github.com/pallets/flask) 

* [x] [Python](https://python.org)

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/Simatwa/tdwnsv3",
    "name": "tdwnsv3",
    "maintainer": "Smartwa Caleb",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "smartwacaleb@gmail.com",
    "keywords": "",
    "author": "Smartwa Caleb",
    "author_email": "smartwacaleb@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/c0/75/85efe380b0eb4cb98e48d7ba5d69543a9a15eb459a99cc1a6f221550514b/tdwnsv3-1.9.5.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">tdwnsv3</h1>\n\n\n\n<p align=\"center\">\n\n<a href=\"https://github.com/Simatwa/tdwnsv3\"><img src=\"https://img.shields.io/static/v1?label=Github&message=Passing&logo=github&color=green\" alt=\"Github\"/></a>\n\n<a href=\"https://pypi.org/project/tdwnsv3\"><img src=\"https://img.shields.io/static/v1?label=Pypi&message=v1.9.5&color=yellow&logo=pypi\" alt=\"pypi\"/></a>\n\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=Coverage&message=80%&color=lime&logo=Coverage\" alt=\"Coverage\"/></a>\n\n<a href=\"https://wakatime.com/badge/github/Simatwa/svinf3\"><img src=\"https://wakatime.com/badge/github/Simatwa/svinf3.svg\" alt=\"wakatime\"/></a>\n\n<a href=\"https://pepy.tech/project/tdwnsv3\"><img src=\"https://static.pepy.tech/badge/tdwnsv3\" alt=\"Downloads\"/></a>\n\n<a href=\"#\"><img src=\"https://visitor-badge.glitch.me/badge?page_id=Simatwa.tdwnsv3&left_color=red&right_color=lime&left_text=Counts\" alt=\"Visitors\"/></a>\n\n<a href=\"#\"><img src=\"https://img.shields.io/static/v1?label=Code Style&message=Black&color=black&logo=Black\" alt=\"Code-style\"/></a>\n\n</p>\n\n\n\n> Access your files on the web.\n\n\n\n![Web interface sample](https://github.com/Simatwa/tdwnsv3/raw/main/assets/web_interface_example.gif)\n\n\n\n## [Independencies](https://github.com/Simatwa/tdwnsv3/raw/main/requirements.txt)\n\n\n\n* Flask\n\n* cryptography\n\n* appdirs\n\n\n\n## Features\n\n\n\n- Simple commandline interface\n\n- Web interface with multiple themes\n\n- Serve as static files server - index.html\n\n- Highly immune against variety of attacks\n\n- Compatible with multiple devices and browsers\n\n- Fully customizable web interface - css\n\n- Upload and download files\n\n- Delete multiple files with a click\n\n\n\n## Installation \n\n\n\n- Choose your suit from the following ways:\n\n\n\n1. From pip \n\n  \n\n  ```sh\n\n  $ pip install tdwnsv3\n\n  ```\n\n\n\n2. From source\n\n\n\n ```sh\n\n $ pip install git+https://github.com/Simatwa/tdwnsv3.git\n\n ```\n\n\n\n 3. Cloning repo and install\n\n\n\n  ```sh\n\n  git clone https://github.com/Simatwa/tdwnsv3.git\n\n  cd tdwnsv3\n\n  sudo bash install.sh\n\n  ```\n\n\n\n\n\n## Usage ##\n\n\n\nEither of the following ways will get you ready at the terminal environment\n\n\n\n1. Package level\n\n```\n\n$ python -m tdwnsv3\n\n```\n\n2. `$ tdwnsv3`\n\n\n\n<p align=\"center\">By default, the server fires up with the following configurations:</p>\n\n\n\n<table align='center'>\n\n<thead>\n\n<tr><th>Command  </th><th style=\"text-align: right;\">  Default</th></tr>\n\n</thead>\n\n<tbody>\n\n<tr><td>host     </td><td style=\"text-align: right;\">    False</td></tr>\n\n<tr><td>port     </td><td style=\"text-align: right;\">     8000</td></tr>\n\n<tr><td>no-sort     </td><td style=\"text-align: right;\">   False</td></tr>\n\n<tr><td>theme    </td><td style=\"text-align: right;\">        3</td></tr>\n\n<tr><td>upload   </td><td style=\"text-align: right;\">    False</td></tr>\n\n<tr><td>encrypt  </td><td style=\"text-align: right;\">    False</td></tr>\n\n<tr><td>session  </td><td style=\"text-align: right;\">    False</td></tr>\n\n</tbody>\n\n</table>\n\n\n\n> **Note** This is just a shallow display of the default configurations.\n\n\n\n## wsgi \n\n\n\nSince Flask server runs at development environment, you may need to run the program on a server such as [Nginx](https://nginx.org) for efficiency.\n\n\n\n```py\n\nfrom tdwnsv3.tdwnsv3 import app\n\n\n\nif __name__ == \"__main__\":\n\n    app.run()\n\n```\n\n\n\nThe [wsgi.py](https://github.com/Simatwa/tdwnsv3/raw/main/wsgi.py) script can be interfaced with **wsgi** such as **uwsgi** to run behind a *server* .\n\n * For  instance intergrating with `uwsgi` as stated in [docs](https://uwsgi-docs.readthedocs.io/en/latest/WSGIquickstart.html) :\n\n \n\n ```\n\n\n\n$ uwsgi --http=0.0.0.0:8080 -w wsgi:app\n\n\n\n```\n\n\n\n<details>\n\n\n\n<summary>\n\n\n\n- Run  ```tdwnsv3 -h``` to view more configuration info as shown.\n\n\n\n</summary>\n\n\n\n```\n\n\n\nusage: tdwnsv3 [-h] [-v] [-d DIR] [-a ALLOW] [-r RESTRICT] [-w WHITELIST]\n\n               [-b BLACKLIST] [-t SPLIT] [-s 1 to 10] [-l 1 to 5] [-o LOG]\n\n               [-ho HOME] [-st STATIC] [-up RECEIVE] [-se SESSION] [-th [1-3]]\n\n               [-cs CSS] [-upp UPLOAD_PATH] [-upe UPLOAD_EXTENSION]\n\n               [-ups UPLOAD_SIZE] [-upl upload_limit] [--upload-multiple]\n\n               [--disable-aggressive] [--display-hidden] [--host] [--no-sort]\n\n               [--view] [--strict] [--preload] [--upload] [--save-css]\n\n               [--no-cache] [--encrypt] [--debug] [--index]\n\n               [port]\n\n\n\nSimple local-files server with security on top!\n\n\n\npositional arguments:\n\n  port                  Port to be used for hosting files\n\n\n\noptions:\n\n  -h, --help            show this help message and exit\n\n  -v, --version         show program's version number and exit\n\n  -d DIR, --dir DIR     Directory to be hosted\n\n  -a ALLOW, --allow ALLOW\n\n                        Host only certain entries\n\n  -r RESTRICT, --restrict RESTRICT\n\n                        Hide entries from being viewed\n\n  -w WHITELIST, --whitelist WHITELIST\n\n                        IP(s) to be excluded from restrictions - default :\n\n                        None\n\n  -b BLACKLIST, --brownlist BLACKLIST\n\n                        IP(s) to be imposed the restrictions - default : all\n\n  -t SPLIT, --split SPLIT\n\n                        Separator for the entries allowed/restricted - default\n\n                        [,]\n\n  -s 1 to 10, --secure 1 to 10\n\n                        Level of security on contents\n\n  -l 1 to 5, --level 1 to 5\n\n                        Logging level\n\n  -o LOG, --log LOG     Filepath to log to\n\n  -ho HOME, --home HOME\n\n                        Home host subdomain path\n\n  -st STATIC, --static STATIC\n\n                        Static host subdomain path\n\n  -up RECEIVE, --receive RECEIVE\n\n                        Upload host subdomain path\n\n  -se SESSION, --session SESSION\n\n                        Maximum session time per user - (mins)\n\n  -th [1-3], --theme [1-3]\n\n                        Theme for displaying contents\n\n  -cs CSS, --css CSS    Customize webpage with the CSS in path\n\n  -upp UPLOAD_PATH, --upload-path UPLOAD_PATH\n\n                        Path for saving uploaded files\n\n  -upe UPLOAD_EXTENSION, --upload-extension UPLOAD_EXTENSION\n\n                        Extensions of files to be uploaded\n\n  -ups UPLOAD_SIZE, --upload-size UPLOAD_SIZE\n\n                        Maximum file size to be uploaded - [MB]\n\n  -upl upload_limit, --upload-limit-person upload_limit\n\n                        Maximum files to be uploaded per IP\n\n  --upload-multiple     Allow users to upload more than one file at a time.\n\n  --disable-aggressive  Not to - Filter all entries with the restricted\n\n                        keywords +\n\n  --display-hidden      Show hidden files and directories\n\n  --host                Host the files on the LAN\n\n  --no-sort             Disable prettifying the display of contents\n\n  --view                Files can be seen but can't be downloaded\n\n  --strict              Only allow whitelisted & brownlisted IPs to access\n\n                        server!\n\n  --preload             Load videos before clicked\n\n  --upload              Allow users to upload files\n\n  --save-css            Saves the css data in path for future use\n\n  --no-cache            Use currently passed parameters not previously saved;\n\n                        content-caching disabled\n\n  --encrypt             Encrypt URIs on the webpage\n\n  --debug               Debug the web application in UI mode\n\n  --index               Serve from index.html file\n\n\n\n```\n\n\n\n</details>\n\n\n\n- Review [CHANGELOG](CHANGELOG.md)\n\n\n\n## Acknowledgements\n\n\n\n* [x] [Flask](https://github.com/pallets/flask) \n\n* [x] [Python](https://python.org)\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Simple local-files server with security on top!",
    "version": "1.9.5",
    "project_urls": {
        "Bug Report": "https://github.com/Simatwa/tdwnsv3/issues/new",
        "Homepage": "https://github.com/Simatwa/tdwnsv3"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "73a3e0957dfcaa303bd4f4a5936803b72923ace6d3a34adc42e8131f7cb4d4d5",
                "md5": "ad146097650b9ecad2cc24bf48a72fbd",
                "sha256": "2e505694e160134b71b50570823b1109da12b584c60b53479b8a9aef2296aa28"
            },
            "downloads": -1,
            "filename": "tdwnsv3-1.9.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "ad146097650b9ecad2cc24bf48a72fbd",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 35122,
            "upload_time": "2023-12-22T10:45:58",
            "upload_time_iso_8601": "2023-12-22T10:45:58.979087Z",
            "url": "https://files.pythonhosted.org/packages/73/a3/e0957dfcaa303bd4f4a5936803b72923ace6d3a34adc42e8131f7cb4d4d5/tdwnsv3-1.9.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c07585efe380b0eb4cb98e48d7ba5d69543a9a15eb459a99cc1a6f221550514b",
                "md5": "559db0dc37b8d0fb83f7336eb5bb3905",
                "sha256": "a9d5541f0931e4672699d3d979e5b26c257332953148a126e499b3d4dc9784a6"
            },
            "downloads": -1,
            "filename": "tdwnsv3-1.9.5.tar.gz",
            "has_sig": false,
            "md5_digest": "559db0dc37b8d0fb83f7336eb5bb3905",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 31955,
            "upload_time": "2023-12-22T10:46:00",
            "upload_time_iso_8601": "2023-12-22T10:46:00.934370Z",
            "url": "https://files.pythonhosted.org/packages/c0/75/85efe380b0eb4cb98e48d7ba5d69543a9a15eb459a99cc1a6f221550514b/tdwnsv3-1.9.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-12-22 10:46:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "Simatwa",
    "github_project": "tdwnsv3",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "tdwnsv3"
}
        
Elapsed time: 0.79583s