hysteria2


Namehysteria2 JSON
Version 2.5.2 PyPI version JSON
download
home_pagehttps://github.com/LorenEteval/hysteria2-python
SummaryPython bindings for hysteria2.
upload_time2024-10-09 10:10:29
maintainerNone
docs_urlNone
authorLoren Eteval
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # hysteria2-python

[![Deploy PyPI](https://github.com/LorenEteval/hysteria2-python/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/hysteria2-python/actions/workflows/deploy-pypi.yml)

Python bindings for [hysteria2](https://github.com/apernet/hysteria).

## Install

### Core Building Tools

You have to install the following tools to be able to install this package successfully.

> Note: hysteria2 v2.0.3+ requires at least go 1.21, which means hysteria2-python will also
> need go 1.21+ to be able to build and install successfully since v2.0.3.

* [go](https://go.dev/doc/install) in your PATH. go 1.20.0 and above is recommended. To check go is ready,
  type `go version`. Also, if google service is blocked in your region(such as Mainland China), you have to configure
  your GOPROXY to be able to pull go packages. For Chinese users, refer to [goproxy.cn](https://goproxy.cn/) for more
  information.
* [cmake](https://cmake.org/download/) in your PATH. To check cmake is ready, type `cmake --version`.
* A working GNU C++ compiler(i.e. GNU C++ toolchains). To check GNU C++ compiler is ready, type `g++ --version`. These
  tools should have been installed in Linux or macOS by default. If you don't have GNU C++ toolchains(especially for
  Windows users) anyway:

    * For Linux users: type `sudo apt update && sudo apt install g++` and that should work out fine.
    * For Windows users: install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files/mingw-w64/)
      or [Cygwin](https://www.cygwin.com/) and make sure you have add them to PATH.

### Install Package

```
pip install hysteria2
```

## API

```pycon
>>> import hysteria2
>>> help(hysteria2) 
Help on package hysteria2:                                                                                                                                                                                    

NAME
    hysteria2

PACKAGE CONTENTS
    hysteria2

FUNCTIONS
    startFromJSON(...) method of builtins.PyCapsule instance
        startFromJSON(json: str) -> None

        Start Hysteria2 client with JSON
```

## Source Code Modification

This repository, including the package that distributes to pypi,
contains [hysteria](https://github.com/apernet/hysteria) source code that's been
modified to build the binding and specific API. If without explicitly remark, the version of this package corresponds to
the version of the origin source code tag, so the binding will have full features as the original go distribution will
have. And due to its backward compatibility, there's no plan to generate bindings for older release of hysteria.

To make installation of this package easier, I didn't add the original [hysteria](https://github.com/apernet/hysteria)
source code as a submodule. To track what modifications have been made to the source code, you can compare it with the
same version under Python binding and corresponding go repository.

## Tested Platform

hysteria2-python works on all major platform with all Python version(Python 3).

Below are tested build in [github actions](https://github.com/LorenEteval/hysteria2-python/actions).

| Platform     | Python 3.7-Python 3.11 |
|--------------|:----------------------:|
| ubuntu 20.04 |   :heavy_check_mark:   |
| ubuntu 22.04 |   :heavy_check_mark:   |
| windows-2019 |   :heavy_check_mark:   |
| windows-2022 |   :heavy_check_mark:   |
| macos-11     |   :heavy_check_mark:   |
| macos-12     |   :heavy_check_mark:   |
| macos-13     |   :heavy_check_mark:   |

## License

The license for this project follows its original go repository [hysteria](https://github.com/apernet/hysteria) and is
under [MIT License](https://github.com/LorenEteval/hysteria2-python/blob/main/LICENSE).
            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/LorenEteval/hysteria2-python",
    "name": "hysteria2",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Loren Eteval",
    "author_email": "loren.eteval@proton.me",
    "download_url": "https://files.pythonhosted.org/packages/9e/34/281048dc08faca430fe3767d7f591dc399b09c65d8055fdf18022e3f9ca3/hysteria2-2.5.2.tar.gz",
    "platform": null,
    "description": "# hysteria2-python\n\n[![Deploy PyPI](https://github.com/LorenEteval/hysteria2-python/actions/workflows/deploy-pypi.yml/badge.svg?branch=main)](https://github.com/LorenEteval/hysteria2-python/actions/workflows/deploy-pypi.yml)\n\nPython bindings for [hysteria2](https://github.com/apernet/hysteria).\n\n## Install\n\n### Core Building Tools\n\nYou have to install the following tools to be able to install this package successfully.\n\n> Note: hysteria2 v2.0.3+ requires at least go 1.21, which means hysteria2-python will also\n> need go 1.21+ to be able to build and install successfully since v2.0.3.\n\n* [go](https://go.dev/doc/install) in your PATH. go 1.20.0 and above is recommended. To check go is ready,\n  type `go version`. Also, if google service is blocked in your region(such as Mainland China), you have to configure\n  your GOPROXY to be able to pull go packages. For Chinese users, refer to [goproxy.cn](https://goproxy.cn/) for more\n  information.\n* [cmake](https://cmake.org/download/) in your PATH. To check cmake is ready, type `cmake --version`.\n* A working GNU C++ compiler(i.e. GNU C++ toolchains). To check GNU C++ compiler is ready, type `g++ --version`. These\n  tools should have been installed in Linux or macOS by default. If you don't have GNU C++ toolchains(especially for\n  Windows users) anyway:\n\n    * For Linux users: type `sudo apt update && sudo apt install g++` and that should work out fine.\n    * For Windows users: install [MinGW-w64](https://sourceforge.net/projects/mingw-w64/files/mingw-w64/)\n      or [Cygwin](https://www.cygwin.com/) and make sure you have add them to PATH.\n\n### Install Package\n\n```\npip install hysteria2\n```\n\n## API\n\n```pycon\n>>> import hysteria2\n>>> help(hysteria2) \nHelp on package hysteria2:                                                                                                                                                                                    \n\nNAME\n    hysteria2\n\nPACKAGE CONTENTS\n    hysteria2\n\nFUNCTIONS\n    startFromJSON(...) method of builtins.PyCapsule instance\n        startFromJSON(json: str) -> None\n\n        Start Hysteria2 client with JSON\n```\n\n## Source Code Modification\n\nThis repository, including the package that distributes to pypi,\ncontains [hysteria](https://github.com/apernet/hysteria) source code that's been\nmodified to build the binding and specific API. If without explicitly remark, the version of this package corresponds to\nthe version of the origin source code tag, so the binding will have full features as the original go distribution will\nhave. And due to its backward compatibility, there's no plan to generate bindings for older release of hysteria.\n\nTo make installation of this package easier, I didn't add the original [hysteria](https://github.com/apernet/hysteria)\nsource code as a submodule. To track what modifications have been made to the source code, you can compare it with the\nsame version under Python binding and corresponding go repository.\n\n## Tested Platform\n\nhysteria2-python works on all major platform with all Python version(Python 3).\n\nBelow are tested build in [github actions](https://github.com/LorenEteval/hysteria2-python/actions).\n\n| Platform     | Python 3.7-Python 3.11 |\n|--------------|:----------------------:|\n| ubuntu 20.04 |   :heavy_check_mark:   |\n| ubuntu 22.04 |   :heavy_check_mark:   |\n| windows-2019 |   :heavy_check_mark:   |\n| windows-2022 |   :heavy_check_mark:   |\n| macos-11     |   :heavy_check_mark:   |\n| macos-12     |   :heavy_check_mark:   |\n| macos-13     |   :heavy_check_mark:   |\n\n## License\n\nThe license for this project follows its original go repository [hysteria](https://github.com/apernet/hysteria) and is\nunder [MIT License](https://github.com/LorenEteval/hysteria2-python/blob/main/LICENSE).",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Python bindings for hysteria2.",
    "version": "2.5.2",
    "project_urls": {
        "Homepage": "https://github.com/LorenEteval/hysteria2-python"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9e34281048dc08faca430fe3767d7f591dc399b09c65d8055fdf18022e3f9ca3",
                "md5": "3172aca6ff189b1423a1f0d7996abae0",
                "sha256": "61330df47d1e39f2fb0c8aa66782e16b48b26754e5bb3fb7bc73d2b29071e587"
            },
            "downloads": -1,
            "filename": "hysteria2-2.5.2.tar.gz",
            "has_sig": false,
            "md5_digest": "3172aca6ff189b1423a1f0d7996abae0",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4605844,
            "upload_time": "2024-10-09T10:10:29",
            "upload_time_iso_8601": "2024-10-09T10:10:29.887048Z",
            "url": "https://files.pythonhosted.org/packages/9e/34/281048dc08faca430fe3767d7f591dc399b09c65d8055fdf18022e3f9ca3/hysteria2-2.5.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-09 10:10:29",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "LorenEteval",
    "github_project": "hysteria2-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "hysteria2"
}
        
Elapsed time: 0.38199s