🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

smartbear-tunnel-python

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

smartbear-tunnel-python

A Python package for automating the Smartbear SecureTunnel

0.3
PyPI
Maintainers
1

Smartbear SecureTunnel Python

A Python package for automating the Smartbear SecureTunnel

Installation

pip install smartbear-tunnel-python

API

SmartbearTunnel constructor:

SmartbearTunnel() (type: SmartbearTunnel): returns an instance of the SmartbearTunnel class Arguments:

  • username (type: str) (optional): the email address/username you use to authenticate with Smartbear products, see authentication for details
  • authkey (type: str) (optional): the authkey/api key you use to authenticate with Smartbear products, see authentication for details
  • options (optional): dictionary of options to use when running the tunnel, supported options:
    • name (type: str): for naming your tunnel, this enables you to run multiple tunnels in parallel
    • directory (type: str): path to files that should be statically hosted by the tunnel
    • proxyIp (type: str): the ip/host of a proxy server to use with the tunnel
    • proxyPort (type: int): the port of a proxy server to use with the tunnel
    • bypass (type: bool): whether to bypass the tunnel for public traffic - defaults to True, may speed up traffic when used
    • verbose (type: bool): for debugging the tunnel client, enables verbose logging to stdout

SmartbearTunnel Attributes:

  • SmartbearTunnel.tunnel_id (type: str): the tunnel ID corresponding with your active tunnel
  • SmartbearTunnel.tunnel_type (type: str): the type of tunnel generated by the client

SmartbearTunnel methods:

  • SmartbearTunnel.run(): starts an active tunnel, must be called to start
  • SmartbearTunnel.is_active() (type: bool): queries whether the current tunnel is still active
  • SmartbearTunnel.stop(): stops the active tunnel

Authorization

You can authenticate by passing your username and authorization key when creating the SmartbearTunnel:

tunnel = SmartbearTunnel(username='myusername', authkey='myauthkey')

You can also use the environment variables:

from bash...
export SMARTBEAR_USERNAME=myusername
export SMARTBEAR_AUTHKEY=myauthkey
python test.py

from test.py...
tunnel = SmartbearTunnel()

This package currently only works for CrossBrowserTesting but will work for Bitbar in the future.

Testing

SMARTBEAR_USERNAME=<TESTING_USERNAME> SMARTBEAR_AUTHKEY=<TESTING_AUTHKEY> python -m unittest tests/test_smartbear_tunnel.py

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts