A simple helper module to get details on the current operating system platorm.
Project description
OSDetect 
What is OSDetect?
OSDetect is a small python module which is able to get some information about your system and python implementation, like the Operating System or the hardware platform.
Supported operating systems
As of now, only GNU/Linux, Mac OS X, Windows NT and Windows NT/Cygwin are supported. At the moment, I'm working on support for a wider range of operating systems.
Since version 1.1.0, Python 2 and Python 3 are both supported.
Note that the information available on the different platforms may differ.
Installation instructions
You can install OSDetect from PyPI using pip:
pip install OSDetect
Alternatively clone this repository and install directly from the source code:
git clone https://github.com/malte70/OSDetect
cd OSDetect
pip install .
Command Line Usage
OSDetect includes a function which is executed if the module is directly called. So give it a try and run:
python -m OSDetect
Example uses of the module
# Get a dict containing all gathered information
from OSDetect import info as os_info
print(os_info.getInfo())
# Get a specific value
print(os_info.getDistribution())
# or using the dict key (a dot means a dict containing a dict)
print(os_info.get("Python.Version"))
On a ArchLinux system, it looks like this:
{
'Python': {
'Version': '3.6.0',
'Implementation': 'CPython'
},
'Machine': 'i686',
'OS': 'Linux',
'OSVersion': '4.10.6-1-ARCH',
'Distribution': 'Arch Linux'
}
'ArchLinux'
'3.6.0'
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file osdetect-1.2.1.tar.gz.
File metadata
- Download URL: osdetect-1.2.1.tar.gz
- Upload date:
- Size: 5.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c2828defba52e39b0d7164303e5cbe064242eac08eb28d62e93b4db3a436d210
|
|
| MD5 |
39272f4c52f2e0de9c9f4084b4b3740e
|
|
| BLAKE2b-256 |
fdc1e77a48e0d18e30037afa25c91dbfe06e34d9020c8a5b6d9cf7798e8ecc00
|
File details
Details for the file osdetect-1.2.1-py3-none-any.whl.
File metadata
- Download URL: osdetect-1.2.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4be3e41f365d57d1131ab8adc6eac34d9083d5f407e92094db427d7cf058f554
|
|
| MD5 |
90133971e7fd4ff772579951e45f977d
|
|
| BLAKE2b-256 |
96bb81c5bf56c0c2ad57e71a779a1651e1578d7b4ad4c7b77f5275f3952b5107
|