No project description provided
Project description
TToolbox CLI
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:
ttbtammtoolbox
Commands
performance
Run performance metrics for given URLs.
ttb performance <arguments>
Arguments:
--url: List of URLs to test (required, can be specified multiple times)--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)--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 and Headers Files
You can use the --headers_file and --cookies_file arguments to specify files containing headers and cookies to be
used in the request. These files should be in YAML format.
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
- name: another-cookie
value: another-cookie-value
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ttb_cli-1.3.tar.gz.
File metadata
- Download URL: ttb_cli-1.3.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16cb884b5c0b1980d6829a5c83bfa3400934b9ccf6d513b3110aa68a70c6dbcd
|
|
| MD5 |
14daa76d42a473b709b9a6186cdd6dd9
|
|
| BLAKE2b-256 |
5a6f8419018c3b98d738395d8f470f0435075ec25d75069c1cf771991662ef67
|
File details
Details for the file ttb_cli-1.3-py3-none-any.whl.
File metadata
- Download URL: ttb_cli-1.3-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d99059df997e93ffb63232a6921e282ba86aca4ab9016d515a9ba1e51bfbf445
|
|
| MD5 |
894f3224ad45606f2fcf7019adde1178
|
|
| BLAKE2b-256 |
78cc07c2b70b2756790c3f8c8cbdef61bf10da4217b11b376cfaadc34cc80593
|