Skip to main content

A Python package for automating the Smartbear SecureTunnel

Project description

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

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

smartbear_tunnel_python-0.1-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file smartbear_tunnel_python-0.1-py3-none-any.whl.

File metadata

  • Download URL: smartbear_tunnel_python-0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.9.5

File hashes

Hashes for smartbear_tunnel_python-0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bbaf84ea9f2015b011d922a9ed20ba57d91b93a4e978c8c18bacce832f407dd2
MD5 de3933acbdd6e5c42e84200dea30b613
BLAKE2b-256 3aca1274aa55bf4352018324a5cf86513ca48c9ccf005ca452cfb38bd282b684

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