wisp-python


Namewisp-python JSON
Version 0.8.1 PyPI version JSON
download
home_pageNone
SummaryAn implementation of a Wisp proxy server in Python
upload_time2025-08-04 11:11:43
maintainerNone
docs_urlNone
authorading2210
requires_python>=3.9
licenseNone
keywords
VCS
bugtrack_url
requirements websockets asyncudp uvloop
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python Wisp Server

This is an implementation of a [Wisp](https://github.com/MercuryWorkshop/wisp-protocol) server, written in Python. It follows the Wisp v1 spec completely, including support for UDP connections.

## Installation:
### Install From Source:
Clone this repository and cd into it, then run the following commands:
```
python3 -m venv .venv
source .venv/bin/activate
pip3 install -e .
```

### Install From PyPI:
Run the following command to install this program:
```
pip3 install wisp-python
```

## Running the Server:
For the best performance use [CPython](https://github.com/python/cpython) 3.11 or newer. [PyPy](https://github.com/pypy/pypy) is not recommended as it is a lot slower than CPython here. 

To start the server, run `python3 -m wisp.server`. The program accepts the following arguments:
```
usage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private] [--log-level LOG_LEVEL]
                          [--threads THREADS] [--proxy PROXY] [--block-udp] [--block-tcp]

A Wisp server implementation, written in Python (v0.8.1)

options:
  -h, --help            show this help message and exit
  --host HOST           The hostname the server will listen on.
  --port PORT           The TCP port the server will listen on.
  --static STATIC       Where static files are served from.
  --limits              Enable rate limits.
  --bandwidth BANDWIDTH
                        Bandwidth limit per IP, in kilobytes per second.
  --connections CONNECTIONS
                        New connections limit per IP.
  --window WINDOW       Fixed window length for rate limits, in seconds.
  --allow-loopback      Allow connections to loopback IP addresses.
  --allow-private       Allow connections to private IP addresses.
  --log-level LOG_LEVEL
                        The log level (either debug, info, warning, error, or critical).
  --threads THREADS     The number of threads to run the server on. By default it uses all CPU cores. (Linux only)
  --proxy PROXY         The url of the socks5h, socks5, sock4a, socks4 or http proxy to use.
  --block-udp           Block UDP streams.
  --block-tcp           Block TCP streams.
```

## Roadmap:
- ~~Rate limits~~
- JSON based config files
- ~~UDP support~~
- ~~Ability to block local addresses~~
- Wisp v2 support

## Copyright:
This repository is licensed under the GNU AGPL v3.

A few third party libraries are used. See [`LICENSE_third_party.md`](https://github.com/MercuryWorkshop/wisp-server-python/blob/main/LICENSE_third_party.md).

### Copyright Notice:
```
wisp-server-python: a Wisp server implementation written in Python
Copyright (C) 2025 Mercury Workshop

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Affero General Public License for more details.

You should have received a copy of the GNU Affero General Public License
along with this program.  If not, see <https://www.gnu.org/licenses/>.
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "wisp-python",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": null,
    "author": "ading2210",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/8a/09/0c1f9dbde95d9e92f982ee1182a766487992df65d994196b97126adf9439/wisp_python-0.8.1.tar.gz",
    "platform": null,
    "description": "# Python Wisp Server\n\nThis is an implementation of a [Wisp](https://github.com/MercuryWorkshop/wisp-protocol) server, written in Python. It follows the Wisp v1 spec completely, including support for UDP connections.\n\n## Installation:\n### Install From Source:\nClone this repository and cd into it, then run the following commands:\n```\npython3 -m venv .venv\nsource .venv/bin/activate\npip3 install -e .\n```\n\n### Install From PyPI:\nRun the following command to install this program:\n```\npip3 install wisp-python\n```\n\n## Running the Server:\nFor the best performance use [CPython](https://github.com/python/cpython) 3.11 or newer. [PyPy](https://github.com/pypy/pypy) is not recommended as it is a lot slower than CPython here. \n\nTo start the server, run `python3 -m wisp.server`. The program accepts the following arguments:\n```\nusage: wisp-server-python [-h] [--host HOST] [--port PORT] [--static STATIC] [--limits] [--bandwidth BANDWIDTH] [--connections CONNECTIONS] [--window WINDOW] [--allow-loopback] [--allow-private] [--log-level LOG_LEVEL]\n                          [--threads THREADS] [--proxy PROXY] [--block-udp] [--block-tcp]\n\nA Wisp server implementation, written in Python (v0.8.1)\n\noptions:\n  -h, --help            show this help message and exit\n  --host HOST           The hostname the server will listen on.\n  --port PORT           The TCP port the server will listen on.\n  --static STATIC       Where static files are served from.\n  --limits              Enable rate limits.\n  --bandwidth BANDWIDTH\n                        Bandwidth limit per IP, in kilobytes per second.\n  --connections CONNECTIONS\n                        New connections limit per IP.\n  --window WINDOW       Fixed window length for rate limits, in seconds.\n  --allow-loopback      Allow connections to loopback IP addresses.\n  --allow-private       Allow connections to private IP addresses.\n  --log-level LOG_LEVEL\n                        The log level (either debug, info, warning, error, or critical).\n  --threads THREADS     The number of threads to run the server on. By default it uses all CPU cores. (Linux only)\n  --proxy PROXY         The url of the socks5h, socks5, sock4a, socks4 or http proxy to use.\n  --block-udp           Block UDP streams.\n  --block-tcp           Block TCP streams.\n```\n\n## Roadmap:\n- ~~Rate limits~~\n- JSON based config files\n- ~~UDP support~~\n- ~~Ability to block local addresses~~\n- Wisp v2 support\n\n## Copyright:\nThis repository is licensed under the GNU AGPL v3.\n\nA few third party libraries are used. See [`LICENSE_third_party.md`](https://github.com/MercuryWorkshop/wisp-server-python/blob/main/LICENSE_third_party.md).\n\n### Copyright Notice:\n```\nwisp-server-python: a Wisp server implementation written in Python\nCopyright (C) 2025 Mercury Workshop\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU Affero General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\nGNU Affero General Public License for more details.\n\nYou should have received a copy of the GNU Affero General Public License\nalong with this program.  If not, see <https://www.gnu.org/licenses/>.\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "An implementation of a Wisp proxy server in Python",
    "version": "0.8.1",
    "project_urls": {
        "Homepage": "https://github.com/MercuryWorkshop/wisp-server-python",
        "Issues": "https://github.com/MercuryWorkshop/wisp-server-python/issues"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "382df98251f4d172b7523a6d544bdc30ff8e42d0f7069a4882f0e7a0d29b139b",
                "md5": "c91bd63f0264ed9e936d592275e6a855",
                "sha256": "f4d0090a41c16a2dad39ad52f1572786679bb81aa918f6c10d150a499c81b9a7"
            },
            "downloads": -1,
            "filename": "wisp_python-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c91bd63f0264ed9e936d592275e6a855",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 28041,
            "upload_time": "2025-08-04T11:11:41",
            "upload_time_iso_8601": "2025-08-04T11:11:41.951079Z",
            "url": "https://files.pythonhosted.org/packages/38/2d/f98251f4d172b7523a6d544bdc30ff8e42d0f7069a4882f0e7a0d29b139b/wisp_python-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "8a090c1f9dbde95d9e92f982ee1182a766487992df65d994196b97126adf9439",
                "md5": "21d677307bbc8ebd1ce1899280204d24",
                "sha256": "fa94e45d9c7a42c6232bbfd523675b05d040ebcfd37163ecd6b4b1691305f8fe"
            },
            "downloads": -1,
            "filename": "wisp_python-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "21d677307bbc8ebd1ce1899280204d24",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 26343,
            "upload_time": "2025-08-04T11:11:43",
            "upload_time_iso_8601": "2025-08-04T11:11:43.169244Z",
            "url": "https://files.pythonhosted.org/packages/8a/09/0c1f9dbde95d9e92f982ee1182a766487992df65d994196b97126adf9439/wisp_python-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-08-04 11:11:43",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "MercuryWorkshop",
    "github_project": "wisp-server-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [
        {
            "name": "websockets",
            "specs": []
        },
        {
            "name": "asyncudp",
            "specs": []
        },
        {
            "name": "uvloop",
            "specs": []
        }
    ],
    "lcname": "wisp-python"
}
        
Elapsed time: 0.59599s