Skip to main content

webconsole

Project description

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使用方法,获取更全面的使用指导,非常感谢,૮(˶ᵔ ᵕ ᵔ˶)ა

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

webconsole-0.0.7.tar.gz (492.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

webconsole-0.0.7-py3-none-any.whl (557.4 kB view details)

Uploaded Python 3

File details

Details for the file webconsole-0.0.7.tar.gz.

File metadata

  • Download URL: webconsole-0.0.7.tar.gz
  • Upload date:
  • Size: 492.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.5

File hashes

Hashes for webconsole-0.0.7.tar.gz
Algorithm Hash digest
SHA256 5be8f39bbe89cbadf3e474c1856ededa70036fdc074ee5bf9bff8a9a69e5a424
MD5 972d90f688ce084d93c22971658cb1f5
BLAKE2b-256 fafd361341080ae80e8eb8e6490f031eabc232c8ae6ce5ca7c809064eea64235

See more details on using hashes here.

File details

Details for the file webconsole-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: webconsole-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 557.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.5

File hashes

Hashes for webconsole-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 dcbe7f880dff53665d441cf6cc16a69683c7dc3d50476c5ee20e6bf134274d31
MD5 1428893e52b63d3ec59d84d3ec6e0f87
BLAKE2b-256 c831ede7cc606ba8fd1c194ecb3117693c30f3740d84491c7729dde4d4fc3bff

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page