Skip to main content

No project description provided

Project description

TToolbox CLI

Release

This is a CLI tool for managing scripts and other tools for performance metrics and other automated tasks.

Installation

Please note that the minimum required Python version is 3.12. Before proceeding make sure you are running Python 3.12 or higher by running the following command: python --version

To install the CLI tool run the following command:

pip install ttb-cli

Upgrading

To upgrade to the latest version, run the following command:

pip install ttb-cli --upgrade

Usage

Config file

Create a .tt.config.yml file in your home directory with the following structure:

chrome_executable_path: /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
max_browser_instances: 5
tmp_dir: /Users/marko/.tmp

Running commands:

ttb <command> <arguments>

Aliases:

  • ttb
  • tammtoolbox

Commands

performance

Run performance metrics for given URLs.

ttb performance <arguments>

Arguments:

  • --url: List of URLs to test (required, can be specified multiple times)
  • --url-file: File containing URLs to test (required if --url is not specified) (YAML format)
  • --output: Output file for performance metrics (required)
  • --iterations: Number of iterations per URL (default: 10)
  • --headless: Run headless browser (optional flag)
  • --concurrent: Run tests concurrently (optional flag)
  • --headers_file: File containing headers to be used in the request in YAML format (optional) (examples and explanation in the Cookies and Headers Files section below)
  • --cookies_file: File containing cookies to be used in the request in YAML format (optional) (examples and explanation in the Cookies and Headers Files section below)

Example:

ttb performance --url https://tamm.abudhabi --url https://doh.gov.ae --iterations 5 --output metrics_report.csv --headless --concurrent

lighthouse

Prerequisites: npm install -g lighthouse

Run Lighthouse report for given URLs.

ttb lighthouse <arguments>

Arguments:

  • --url: List of URLs to test (required, can be specified multiple times)
  • --url-file: File containing URLs to test (required if --url is not specified) (YAML format)
  • --output: Output file for Lighthouse report (required)
  • --headless: Run headless browser (optional flag)
  • --concurrent: Run tests concurrently (optional flag)
  • --preset: Lighthouse preset (desktop or mobile, default: desktop)
  • --headers_file: File containing headers to be used in the request in YAML format (optional) (examples and explanation in the Cookies and Headers Files section below)
  • --cookies_file: File containing cookies to be used in the request in YAML format (optional) (examples and explanation in the Cookies and Headers Files section below)

Example:

ttb lighthouse --url https://tamm.abudhabi --url https://www.tamm.abudhabi/en/contact --output lighthouse_report.csv --headless --concurrent --preset mobile

These commands allow you to run performance metrics and Lighthouse reports on specified URLs, with options for headless browsing, concurrent execution, and customizable settings.

Cookies, Headers, and URL files

You can use the --url-file, --headers_file, and --cookies_file arguments to specify files containing urls, headers, and cookies to be used in the request. These files should be in YAML format.

Example URL file:

urls: 
  - https://tamm.abudhabi
  - https://doh.gov.ae

Example headers file:

- name: X-My-Header
  value: my-header-value
- name: X-Another-Header
  value: another-header-value

Example cookies file:

- name: my-cookie
  value: my-cookie-value
  domain: .tamm.abudhabi
- name: another-cookie
  value: another-cookie-value
  domain: .tamm.abudhabi

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

ttb_cli-1.4.tar.gz (11.4 kB view details)

Uploaded Source

Built Distribution

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

ttb_cli-1.4-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file ttb_cli-1.4.tar.gz.

File metadata

  • Download URL: ttb_cli-1.4.tar.gz
  • Upload date:
  • Size: 11.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for ttb_cli-1.4.tar.gz
Algorithm Hash digest
SHA256 21de5018f22a35d43a6f5206d92b989ffe34d891b4f12d3383ffb19d6b367187
MD5 27784ed88da17107cee5aa73ea0c9a8b
BLAKE2b-256 b39470bbb65440574421c23d2f20e469558dc82705b6de3279e9330fcbe34c09

See more details on using hashes here.

File details

Details for the file ttb_cli-1.4-py3-none-any.whl.

File metadata

  • Download URL: ttb_cli-1.4-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.5

File hashes

Hashes for ttb_cli-1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 c125f2ca6da080e33040bf379f86ea266c01ba63c3fb2c8e56677c20cc78fc7c
MD5 cd56959379620a8c96cdd377f3110cb9
BLAKE2b-256 42924cf9f564fd89929b6e8d870fdaca228540fed680f476992df7fa985a3e76

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