osversionchecker


Nameosversionchecker JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/osversionchecker
SummaryChecks what os is running
upload_time2024-07-14 15:16:08
maintainerNone
docs_urlNone
authorJohannes Fischer
requires_pythonNone
licenseMIT
keywords os
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Checks what os is running

### Tested against Windows 10/Android/Linux / Python 3.11 / Anaconda

### pip install osversionchecker

### The main focus is differentiating classic Linux / Android


``` py
    Determines the operating system by analyzing various system characteristics
    and assigns points based on detected features. The OS with the highest points
    is considered the active operating system.

    Returns:
        tuple: A dictionary with the points for each operating system and the 
        name of the detected active operating system.

    The function checks the following:
    - If the sys.executable path indicates a Windows system.
    - If the sys.executable path starts with '/data/data/' indicating an Android system.
    - The count of backslashes and slashes in the environment variables string.
    - The presence of certain files or directories that are specific to Windows or Android.
    - The output of certain shell commands that indicate an Android system.
    - The content of the uname command output to check for Linux, Darwin (macOS), or Android.
    - The platform information from the platform module to check for Linux, Darwin (macOS), or Android.
    - The sys.platform value to check for Linux, Darwin (macOS), Windows, or Android.
    - The sys.version string to check for Linux, Darwin (macOS), or Windows.

from osversionchecker import check_os

os_system_points, active_os_system = check_os()
print(active_os_system)
print(os_system_points)


windows
{'windows': 5, 'linux': 0, 'darwin': 0, 'android': 0}


```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/osversionchecker",
    "name": "osversionchecker",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "os",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/09/a1/560a1ed6f0b4623ba097b3e080d83feb96b503eea76240d07f93faaa882c/osversionchecker-0.10.tar.gz",
    "platform": null,
    "description": "\r\n# Checks what os is running\r\n\r\n### Tested against Windows 10/Android/Linux / Python 3.11 / Anaconda\r\n\r\n### pip install osversionchecker\r\n\r\n### The main focus is differentiating classic Linux / Android\r\n\r\n\r\n``` py\r\n    Determines the operating system by analyzing various system characteristics\r\n    and assigns points based on detected features. The OS with the highest points\r\n    is considered the active operating system.\r\n\r\n    Returns:\r\n        tuple: A dictionary with the points for each operating system and the \r\n        name of the detected active operating system.\r\n\r\n    The function checks the following:\r\n    - If the sys.executable path indicates a Windows system.\r\n    - If the sys.executable path starts with '/data/data/' indicating an Android system.\r\n    - The count of backslashes and slashes in the environment variables string.\r\n    - The presence of certain files or directories that are specific to Windows or Android.\r\n    - The output of certain shell commands that indicate an Android system.\r\n    - The content of the uname command output to check for Linux, Darwin (macOS), or Android.\r\n    - The platform information from the platform module to check for Linux, Darwin (macOS), or Android.\r\n    - The sys.platform value to check for Linux, Darwin (macOS), Windows, or Android.\r\n    - The sys.version string to check for Linux, Darwin (macOS), or Windows.\r\n\r\nfrom osversionchecker import check_os\r\n\r\nos_system_points, active_os_system = check_os()\r\nprint(active_os_system)\r\nprint(os_system_points)\r\n\r\n\r\nwindows\r\n{'windows': 5, 'linux': 0, 'darwin': 0, 'android': 0}\r\n\r\n\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Checks what os is running",
    "version": "0.10",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/osversionchecker"
    },
    "split_keywords": [
        "os"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "349bd378068e4b1c43a62f0fdac4001d8b2a062a7a2e27bf5301c51e31003ac6",
                "md5": "31c26b498264f5d4e3d7de2db5161d87",
                "sha256": "a4eda7e1a4e8642defb4db0dca8f25c2415d52a5ed74bc7fabc1d37fccdc0df3"
            },
            "downloads": -1,
            "filename": "osversionchecker-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "31c26b498264f5d4e3d7de2db5161d87",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 6266,
            "upload_time": "2024-07-14T15:16:07",
            "upload_time_iso_8601": "2024-07-14T15:16:07.088755Z",
            "url": "https://files.pythonhosted.org/packages/34/9b/d378068e4b1c43a62f0fdac4001d8b2a062a7a2e27bf5301c51e31003ac6/osversionchecker-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "09a1560a1ed6f0b4623ba097b3e080d83feb96b503eea76240d07f93faaa882c",
                "md5": "2bcaf8142cd438ffdd18a7474af194ef",
                "sha256": "eac17ae86ac196d845c46c797b02c4db485de74888a5bd112e2c32efa2c39c21"
            },
            "downloads": -1,
            "filename": "osversionchecker-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "2bcaf8142cd438ffdd18a7474af194ef",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4154,
            "upload_time": "2024-07-14T15:16:08",
            "upload_time_iso_8601": "2024-07-14T15:16:08.734806Z",
            "url": "https://files.pythonhosted.org/packages/09/a1/560a1ed6f0b4623ba097b3e080d83feb96b503eea76240d07f93faaa882c/osversionchecker-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-07-14 15:16:08",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "osversionchecker",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "osversionchecker"
}
        
Elapsed time: 0.30694s