Skip to main content

sys-detection

https://pypi.org/project/sys-detection/

Allows identifiying the current operating system, which is helpful when building and packaging cross-platform software.

Usage as module

>>> from sys_detection import local_sys_conf

>>> local_sys_conf()
 <sys_detection.SysConfiguration system='Linux' architecture='x86_64' linux_os_release={'NAME': 'CentOS Stream', 'VERSION': '8', 'ID': 'centos', 'ID_LIKE': 'rhel fedora', 'VERSION_ID': '8', 'PLATFORM_ID': 'platform:el8', 'PRETTY_NAME': 'CentOS Stream 8', 'ANSI_COLOR': '0;31', 'CPE_NAME': 'cpe:/o:centos:centos:8', 'HOME_URL': 'https://centos.org/', 'BUG_REPORT_URL': 'https://bugzilla.redhat.com/', 'REDHAT_SUPPORT_PRODUCT': 'Red Hat Enterprise Linux 8', 'REDHAT_SUPPORT_PRODUCT_VERSION': 'CentOS Stream'} at 0x7f0123456789>

>>> local_sys_conf().id_for_packaging()
'centos8-x86_64'

>>> local_sys_conf().id_for_packaging(mid_part=['moreinfo'])
'centos8-moreinfo-x86_64'

>>> local_sys_conf().id_for_packaging(separator='_')
'centos8_x86_64'

Command-line usage

python3 -m sys_detection

Output:

centos8-x86_64

Release files for sys-detection 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for sys-detection 1.3.4
File Size Uploaded
sys_detection-1.3.4.tar.gz 8.9 kB Details

Release files / sys_detection-1.3.4.tar.gz

Download URL sys_detection-1.3.4.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0a8d325a16e5aa98db1eb1f91d46341889bdc8fb6c7b46510c9e56957ba7a895
BLAKE2b-256 checksum
How to use checksums
8eba9cd0b38af4ef155fb0c15d714ed77f6a528a80123ff0ef8e13ef31f43e04
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

1.3.4 This release

1 release file

1.3.0

1 release file

1.2.0

1 release file

1.1.2

1 release file

1.1.1

1 release file

1.1.0

1 release file

1.0.5

1 release file

1.0.4

1 release file

1.0.3

1 release file

1.0.2

1 release file

1.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page