cbttunnels-0.0.3
توضیحات
A wrapper for cbttunnels, to make testing local sites easier in CrossBrowserTesting
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | cbttunnels-0.0.3 |
| نام | cbttunnels |
| نسخه کتابخانه | 0.0.3 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | CrossBrowserTesting |
| ایمیل نویسنده | info@crossbrowsertesting.com |
| آدرس صفحه اصلی | https://github.com/crossbrowsertesting/cbt_tunnels_py |
| آدرس اینترنتی | https://pypi.org/project/cbttunnels/ |
| مجوز | - |
# cbt_tunnels
A python module to make using tunnels easy.
Note: this is pre-release software. If you encounter any problems,
please reach out to CrossBrowserTesting
## pip
`pip install cbttunnels`
## How to use
```
from cbttunnels.cbt_tunnels import CBTtunnel
tunnel = CBTtunnel(username="username", authkey="authkey")
tunnel.start_tunnel()
...
tunnel.kill_tunnel()
```
## Features
* Automatically gets the correct tunnel for your platform
* Handles cleanly starting and stopping the tunnel connection
* Handles all features of the tunnel
## Creating a tunnel object
The tunnel object is created with the following options:
* `username` ("") - CBT username
* `authkey` ("") - CBT authkey
* `delete_after` (False) - delete the tunnel binary after kill (note: on Windows, make sure backslashes are escaped `\\`)
* `tunnel_location` (".") - location to download tunnel zip/bianry to
* `ready_file` ("ready.check") - ready file for tunnel client
* `kill_file` ("kill.check") - kill file for tunnel client
## Tunnel options
These are all methods available on the tunnel object
* `bypass(bool)` - enable or disable bypass
* `set_https_proxy(string)` - string should be the HTTPS proxy
* `set_http_proxy(string)` - same as above for HTTP
* `set_tunnel_name(string)` - set the name of the named tunnel
* `set_pac_file(string)` - set the client to use the PAC file at path string
* `set_html_path(string)` - set the path to use for local HTML files to be served
* `set_proxy(host="string", port="string", username="string"/None, password="string/None)` - set proxy settings
* `set_accept_all_certs(bool)` - set whether to accept all certs in the tunnel client
نیازمندی
| مقدار | نام |
|---|---|
| - | requests |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6.2 | Python |
نحوه نصب
نصب پکیج whl cbttunnels-0.0.3:
pip install cbttunnels-0.0.3.whl
نصب پکیج tar.gz cbttunnels-0.0.3:
pip install cbttunnels-0.0.3.tar.gz