webconsole


Namewebconsole JSON
Version 0.0.7 PyPI version JSON
download
home_page
Summarywebconsole
upload_time2023-05-08 06:16:11
maintainer
docs_urlNone
authorRayCheung
requires_python
license
keywords pip webconsole python docker
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # webconsole使用



## 安装webconsole包
```
pip install webconsole==0.0.3 -i https://pypi.org/simple
具体有什么版本需要自己看 https://pypi.org/project/webconsole/   找到目前最新的版本并替换上面的版本号
```


## 代码中需要改动的地方

### 引用路由
```
from webconsole.docker.docker_console import docker_webconsole
from webconsole.linux.linux_console import linux_webconsole
```

### 加入路由到访问路径
```
app.include_router(docker_webconsole, prefix='/docker_webconsole', tags=['docker_webconsole相关,使用请谨慎'], dependencies=[Depends(oauth2_schema)])  # noqa
app.include_router(linux_webconsole, prefix='/linux_webconsole', tags=['linux_webconsole相关,使用请谨慎'], dependencies=[Depends(oauth2_schema)])  # noqa

#app.include_router(docker_webconsole, prefix='/docker_webconsole', tags=['docker_webconsole相关,使用请谨慎'], dependencies=[])  # noqa
#app.include_router(linux_webconsole, prefix='/linux_webconsole', tags=['linux_webconsole相关,使用请谨慎'], dependencies=[])  # noqa
```


===PS: Linux服务需要在你的项目根目录下放置文件private_key文件,文件中是你的私钥,确保对应的公钥已经放到你要ssh的机器上了,不然登陆肯定是失败的===





## 示例接口访问路径
```
ws://127.0.0.1:60528/docker_webconsole/ws/f977748aabad?docker_address=localhost&port=2375  (这是docker的请求路径)

ws://127.0.0.1:60528/linux_webconsole/ws/linux?address=127.0.0.1&user=rbadmin_app1     (不带passwd表示默认使用你自己项目根目录下的private_key文件进行ssh登陆)

ws://127.0.0.1:60528/linux_webconsole/ws/linux?address=127.0.0.1&user=raypick&passwd=raypick   不带passwd表示默认使用密码进行ssh登陆)
```

具体使用方法,请访问我的CSDN博客,https://blog.csdn.net/weixin_44388689?type=blog

搜索webconsole使用方法,获取更全面的使用指导,非常感谢,૮(˶ᵔ ᵕ ᵔ˶)ა

            

Raw data

            {
    "_id": null,
    "home_page": "",
    "name": "webconsole",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "pip,webconsole,python,docker",
    "author": "RayCheung",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/fa/fd/361341080ae80e8eb8e6490f031eabc232c8ae6ce5ca7c809064eea64235/webconsole-0.0.7.tar.gz",
    "platform": null,
    "description": "# webconsole\u4f7f\u7528\n\n\n\n## \u5b89\u88c5webconsole\u5305\n```\npip install webconsole==0.0.3 -i https://pypi.org/simple\n\u5177\u4f53\u6709\u4ec0\u4e48\u7248\u672c\u9700\u8981\u81ea\u5df1\u770b https://pypi.org/project/webconsole/   \u627e\u5230\u76ee\u524d\u6700\u65b0\u7684\u7248\u672c\u5e76\u66ff\u6362\u4e0a\u9762\u7684\u7248\u672c\u53f7\n```\n\n\n## \u4ee3\u7801\u4e2d\u9700\u8981\u6539\u52a8\u7684\u5730\u65b9\n\n### \u5f15\u7528\u8def\u7531\n```\nfrom webconsole.docker.docker_console import docker_webconsole\nfrom webconsole.linux.linux_console import linux_webconsole\n```\n\n### \u52a0\u5165\u8def\u7531\u5230\u8bbf\u95ee\u8def\u5f84\n```\napp.include_router(docker_webconsole, prefix='/docker_webconsole', tags=['docker_webconsole\u76f8\u5173,\u4f7f\u7528\u8bf7\u8c28\u614e'], dependencies=[Depends(oauth2_schema)])  # noqa\napp.include_router(linux_webconsole, prefix='/linux_webconsole', tags=['linux_webconsole\u76f8\u5173,\u4f7f\u7528\u8bf7\u8c28\u614e'], dependencies=[Depends(oauth2_schema)])  # noqa\n\n#app.include_router(docker_webconsole, prefix='/docker_webconsole', tags=['docker_webconsole\u76f8\u5173,\u4f7f\u7528\u8bf7\u8c28\u614e'], dependencies=[])  # noqa\n#app.include_router(linux_webconsole, prefix='/linux_webconsole', tags=['linux_webconsole\u76f8\u5173,\u4f7f\u7528\u8bf7\u8c28\u614e'], dependencies=[])  # noqa\n```\n\n\n===PS: Linux\u670d\u52a1\u9700\u8981\u5728\u4f60\u7684\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u653e\u7f6e\u6587\u4ef6private_key\u6587\u4ef6\uff0c\u6587\u4ef6\u4e2d\u662f\u4f60\u7684\u79c1\u94a5\uff0c\u786e\u4fdd\u5bf9\u5e94\u7684\u516c\u94a5\u5df2\u7ecf\u653e\u5230\u4f60\u8981ssh\u7684\u673a\u5668\u4e0a\u4e86\uff0c\u4e0d\u7136\u767b\u9646\u80af\u5b9a\u662f\u5931\u8d25\u7684===\n\n\n\n\n\n## \u793a\u4f8b\u63a5\u53e3\u8bbf\u95ee\u8def\u5f84\n```\nws://127.0.0.1:60528/docker_webconsole/ws/f977748aabad?docker_address=localhost&port=2375  \uff08\u8fd9\u662fdocker\u7684\u8bf7\u6c42\u8def\u5f84\uff09\n\nws://127.0.0.1:60528/linux_webconsole/ws/linux?address=127.0.0.1&user=rbadmin_app1     \uff08\u4e0d\u5e26passwd\u8868\u793a\u9ed8\u8ba4\u4f7f\u7528\u4f60\u81ea\u5df1\u9879\u76ee\u6839\u76ee\u5f55\u4e0b\u7684private_key\u6587\u4ef6\u8fdb\u884cssh\u767b\u9646\uff09\n\nws://127.0.0.1:60528/linux_webconsole/ws/linux?address=127.0.0.1&user=raypick&passwd=raypick   \u4e0d\u5e26passwd\u8868\u793a\u9ed8\u8ba4\u4f7f\u7528\u5bc6\u7801\u8fdb\u884cssh\u767b\u9646\uff09\n```\n\n\u5177\u4f53\u4f7f\u7528\u65b9\u6cd5\uff0c\u8bf7\u8bbf\u95ee\u6211\u7684CSDN\u535a\u5ba2\uff0chttps://blog.csdn.net/weixin_44388689?type=blog\n\n\u641c\u7d22webconsole\u4f7f\u7528\u65b9\u6cd5\uff0c\u83b7\u53d6\u66f4\u5168\u9762\u7684\u4f7f\u7528\u6307\u5bfc\uff0c\u975e\u5e38\u611f\u8c22\uff0c\u0aee(\u02f6\u1d54 \u1d55 \u1d54\u02f6)\u10d0\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "webconsole",
    "version": "0.0.7",
    "project_urls": null,
    "split_keywords": [
        "pip",
        "webconsole",
        "python",
        "docker"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "c831ede7cc606ba8fd1c194ecb3117693c30f3740d84491c7729dde4d4fc3bff",
                "md5": "1428893e52b63d3ec59d84d3ec6e0f87",
                "sha256": "dcbe7f880dff53665d441cf6cc16a69683c7dc3d50476c5ee20e6bf134274d31"
            },
            "downloads": -1,
            "filename": "webconsole-0.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "1428893e52b63d3ec59d84d3ec6e0f87",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 557358,
            "upload_time": "2023-05-08T06:16:05",
            "upload_time_iso_8601": "2023-05-08T06:16:05.519463Z",
            "url": "https://files.pythonhosted.org/packages/c8/31/ede7cc606ba8fd1c194ecb3117693c30f3740d84491c7729dde4d4fc3bff/webconsole-0.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fafd361341080ae80e8eb8e6490f031eabc232c8ae6ce5ca7c809064eea64235",
                "md5": "972d90f688ce084d93c22971658cb1f5",
                "sha256": "5be8f39bbe89cbadf3e474c1856ededa70036fdc074ee5bf9bff8a9a69e5a424"
            },
            "downloads": -1,
            "filename": "webconsole-0.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "972d90f688ce084d93c22971658cb1f5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 492716,
            "upload_time": "2023-05-08T06:16:11",
            "upload_time_iso_8601": "2023-05-08T06:16:11.460709Z",
            "url": "https://files.pythonhosted.org/packages/fa/fd/361341080ae80e8eb8e6490f031eabc232c8ae6ce5ca7c809064eea64235/webconsole-0.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-05-08 06:16:11",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "webconsole"
}
        
Elapsed time: 0.06682s