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.1.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.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: installed_browsers-0.1.1.tar.gz
  • Upload date:
  • Size: 9.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure

File hashes

Hashes for installed_browsers-0.1.1.tar.gz
Algorithm Hash digest
SHA256 2c3cb3ed425ad026599377235b111c704310f399f69d5b568217205cc6a58b52
MD5 ce1f0528b94996e34d1cb39036a94c84
BLAKE2b-256 cd01327a0fc09b7ddd43760aa839bc8b261fb2a2b29f285dea713b0cb89d542f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: installed_browsers-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.12.1 Linux/6.5.0-1021-azure

File hashes

Hashes for installed_browsers-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a39034e0e2f4b0c9ec124f382cdafc5308fdd7fb81df9bd49fc592b2bfee24df
MD5 e74230c8a0aee7a9e0d023cc667b9640
BLAKE2b-256 de0342bfe65ae74768312be681139d2c1c9c4d082d06cef9cab9e029e8bb2192

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