Skip to main content

Chrome Version

Coverage PyPI - Version PyPI - Python Version License Latest Commit

Downloads Downloads/Month Downloads/Week

Get the version of Chrome installed on Windows, Linux, Mac. Cross-platform using Python, native OS detection, does not require Selenium.


Table of Contents

Installation

uv add chrome-version

Usage

Module:

import chrome_version
print(chrome_version.get_chrome_version())
# '103.0.5060.114'

CLI:

chrome-version
103.0.5060.114

Motivation

TL;DR I don't want to copy and paste it again...

At first,

I needed to get the Chrome version for a project I was working on, which was using Undetected Chromedriver. I found this gist.

After using it in several projects, I decided to turn it into a module so I'll be free of copy/paste. It only have one functionality: getting the chrome version.

Then,

I decided to use this package to learn more about:

  • Using Poetry for packaging and dependency management.
  • Using scripts for CLI.
  • Versioning.
  • License management.
  • Documentation.
  • Publishing a module on PyPI.
  • Using GitHub Actions to automate the publishing process.
  • ...

Finally,

Now it's kind of a playground for me to learn more...

One other thing is that it's educational: A simple module is a good practice for me to learn how to build modules and publish them on PyPI and show others how easy it is.

Features

  • Cross-platform
  • No external dependencies
  • CLI
  • Module

Development

Clone the repository and cd into the project directory:

git clone https://github.com/hasansezertasan/hwid
cd hwid

The commands below can also be executed using the xc task runner, which combines the usage instructions with the actual commands. Simply run xc, it will popup an interactive menu with all available tasks.

pre-commit

Run the pre-commit hooks:

uvx pre-commit run --all-files --hook-stage manual --show-diff-on-failure

checks

Run all checks to ensure code quality:

uvx "validate-pyproject[all]" pyproject.toml
uvx typos
uvx vulture src
uvx ruff check
uvx taplo lint pyproject.toml
uvx ruff format
uvx taplo format pyproject.toml
uvx mypy src
uvx mypy --install-types --non-interactive src/chrome_version

docs:serve

Serve the documentation locally:

uvx --with-requirements requirements.docs.txt --reinstall mkdocs serve

docs:build

Build the documentation locally:

uvx --with-requirements requirements.docs.txt --reinstall mkdocs build

Author

Disclaimer

Based on chrome-version-gist by Kory Becker.

This package provides a CLI wrapper for the original project. All credit reserved to the author of the original code.

License

chrome-version is distributed under the terms of the MIT license.

Metadata

Release files for chrome-version 0.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for chrome-version 0.4.0
File Size Uploaded
chrome_version-0.4.0.tar.gz 14.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for chrome-version 0.4.0
File Interpreter ABI Platform
chrome_version-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 21.7 kB

Release files / chrome_version-0.4.0.tar.gz

Download URL chrome_version-0.4.0.tar.gz
Size 14.2 kB
Tags Source
SHA-256 checksum
How to use checksums
885738d0fff7f085aa832838eb2f127001621cb987592c5a1ee9ec1729e9f4f1
BLAKE2b-256 checksum
How to use checksums
fbcab5c27e24c98e5e055e7d241b47b73dd53f88012534ff048c9139cea6e591
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.8

Release files / chrome_version-0.4.0-py3-none-any.whl

Download URL chrome_version-0.4.0-py3-none-any.whl
Size 7.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3fdd6071e2412c420e18c8985a148a626a69fe96e4e523efcf4b8769a3ab0878
BLAKE2b-256 checksum
How to use checksums
9705e7157a25fe18d195b0d194da076056bcd81f125dd23b1cac6b65e7286852
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.8

Release history Release notifications | RSS feed

This release

0.4.0 This release

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page