Skip to main content

Python library to check installed browsers

Project description

installed browsers

A simple python library to help you identify the installed browsers in your host operating system.

functions you can do with this library

  • identify installed browsers
  • identify default browser
  • get specific browser details
  • get specific browser version

supported operating systems

  • linux
  • macos
  • windows

supported browsers

  • google chrome
  • google chrome canary [^1]
  • chromium
  • firefox
  • firefox developer [^1]
  • firefox nightly [^1]
  • safari [^2]
  • opera
  • opera beta
  • opera developer
  • internet explorer [^3]
  • microsoft edge
  • microsoft edge beta
  • microsoft edge canary [^1]
  • microsoft edge developer
  • brave
  • brave beta
  • brave nightly
  • vivaldi [^4]
  • vivaldi snapshot [^4]
  • min
  • arc [^2]
  • kosmik [^2]
  • pale moon [^1]
    [^1]: only for mac and windows [^2]: only for mac [^3]: only for windows [^4]: windows has restrictions

[!NOTE] Firefox beta, developer and nightly are portable versions in linux, these cannot be installed through package managers.
Identification of these versions (as kind of local installations) is not supported by this library.

[!NOTE] Vivaldi stable and snapshot cannot be installed simultaneously on windows. Any of them counts as vivaldi after installation, only the application icon and version number differ between these, but only one instance can be used.
For identification, it does not matter which one is installed, it is detected as vivaldi.

[!NOTE] Kosmik is partially supported by mac. Identification works but from its specific nature, browser cannot be set as default currently.

[!NOTE] Pale moon is not supported by linux as it behaves as a kind of local installation.

[!IMPORTANT] Firefox beta is not supported in any of the operating systems as it is almost identical with the stable version.

  • Beta and stable versions use the same naming convention. For proper working, make sure that either stable or beta version is installed but not both.
  • For mac, you need to add a different application name for beta if you have already installed the stable version previously.
  • By default, in windows, beta is installed into a different location than stable: Application Data.

Technical naming is the same, so python is not able to make proper difference between these versions. It is quite likely that you get beta details for stable version and vice versa. To avoid this inconsistent behaviour, do not install firefox stable and beta altogether.

how to install?

pip install installed_browsers

usage

import

import installed_browsers

identify installed browsers

Returns an iterator of dictionary of browser key and information.

import installed_browsers

print(list(installed_browsers.browsers()))

output

[{'name': 'chrome', 'description': 'Google Chrome', 'version': '123.0.6312.58', 'location': '/usr/bin/google-chrome-stable'},
{'name': 'firefox', 'description': 'Firefox Web Browser', 'version': '124.0', 'location': 'firefox'}]

identify default browser

Returns default browser description.

import installed_browsers

print(installed_browsers.what_is_the_default_browser())

output

Google Chrome

check if browser is installed

Returns True if the browser is installed.

import installed_browsers

print(installed_browsers.do_i_have_installed("chrome"))

output

True

get specific browser details

Returns a dictionary containing browser name, description, desktop version and location.

import installed_browsers

print(installed_browsers.give_me_details_of("chrome"))

output

{'name': 'chrome', 'description': 'Google Chrome', 'version': '123.0.6312.58', 'location': '/usr/bin/google-chrome-stable'}

get specific browser version

Returns a dictionary containing browser version.

import installed_browsers

print(installed_browsers.get_version_of("chrome"))

output

{'version': '123.0.6312.58'}

references

Thanks for the inspiration to Ronie Martinez.

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

installed_browsers-0.1.5.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

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

installed_browsers-0.1.5-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file installed_browsers-0.1.5.tar.gz.

File metadata

  • Download URL: installed_browsers-0.1.5.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for installed_browsers-0.1.5.tar.gz
Algorithm Hash digest
SHA256 fb71f5d9f5bc13e5afcb82a903d3f4aa3dcf8240073057c08aba678d01a61072
MD5 8691eeee251626f89b81d025fbd5ddcb
BLAKE2b-256 92370f47bcdd0ad62ba6683d0d61dcb26504026d5a4ba020863024d0a2f2e7cb

See more details on using hashes here.

Provenance

The following attestation bundles were made for installed_browsers-0.1.5.tar.gz:

Publisher: pypi.yml on undeflorate/installed_browsers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file installed_browsers-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for installed_browsers-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 56667e4241bbe00b5bf45040931dbd6a72612318903a6e562ce87946a38860d0
MD5 bda4f183d170ccc8758b7d5aed0ba1c6
BLAKE2b-256 f34bb29e3f4bd53103a382d9e1b73dc316773c221511bfe57d4bd5016ddaf085

See more details on using hashes here.

Provenance

The following attestation bundles were made for installed_browsers-0.1.5-py3-none-any.whl:

Publisher: pypi.yml on undeflorate/installed_browsers

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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