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 developer
    [^1]: only for mac and windows [^2]: only for mac [^3]: only for windows

[!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.

[!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

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.2.tar.gz (9.5 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.2-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: installed_browsers-0.1.2.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/5.1.0 CPython/3.12.4

File hashes

Hashes for installed_browsers-0.1.2.tar.gz
Algorithm Hash digest
SHA256 94573ff440a9f3c316341385c9ac61968c68ee86584a06567228fb17fb5e7cb4
MD5 5e90f6744a5f24611ef3070bacfb68e3
BLAKE2b-256 f7d9179c57cd36c2da20e24d0d6f19bfd76d0f37fac4e412de13b11b1f005c89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for installed_browsers-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f6faaccc2feff9b1e072a82a987824a4340c73f4d31bfd3b3fc5e986fd675d18
MD5 b9423f73e66419bf0904db5aac411f02
BLAKE2b-256 4fdbabc4f155728dc29a29c5cdc154bdf279d08d40d0705983333d61e4460b0f

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