winvers
Definitive Windows version checker for Python
This module provides
- A list of Windows versions constants (comparable between them)
- A function to get the Windows OS version running on the machine
Compatibility
- Python 2.7.x
- Python 3.x and newer
Constants list
NO_WIN
WIN_10_19H2
WIN_10_19H1
WIN_10_1809
WIN_10_1803
WIN_10_1709
WIN_10_1703
WIN_10_1607
WIN_10_1511
WIN_10_1507
WIN_10
WIN_8_1
WIN_8
WIN_7_SP1
WIN_7
WIN_VISTA_SP1
WIN_VISTA
WIN_XP_X64_SP2
WIN_XP_X64_SP1
WIN_XP_X64
WIN_XP_SP3
WIN_XP_SP2
WIN_XP_SP1
WIN_XP
WIN_2000
WIN_SERVER_2016_1709
WIN_SERVER_2016_1607
WIN_SERVER_2016
WIN_SERVER_2012_R2
WIN_SERVER_2012
WIN_SERVER_2008_R2
WIN_SERVER_2008
WIN_SERVER_2003_SP2
WIN_SERVER_2003_SP1
WIN_SERVER_2003
Example
import winvers
if winvers.get_version() >= winvers.WIN_VISTA:
print('Your OS is newer than Windows XP')
if winvers.get_version() >= winvers.WIN_10:
print('Your OS is Windows 10')
Sources
- https://docs.python.org/2/library/sys.html#sys.getwindowsversion
- https://docs.python.org/3/library/sys.html#sys.getwindowsversion
- https://en.wikipedia.org/wiki/Windows\_10\_version\_history
- https://en.wikipedia.org/wiki/Windows\_Server\_2016#Version\_history
- https://msdn.microsoft.com/en-us/library/windows/desktop/ms724832(v=vs.85).aspx
Metadata
Release files for winvers 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| winvers-0.1.6.tar.gz | 5.0 kB | Without provenance | Details for winvers-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| winvers-0.1.6-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for winvers-0.1.6-py2.py3-none-any.whl |
Total release size: 24.1 kB
Release files / winvers-0.1.6.tar.gz
| Download URL | winvers-0.1.6.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43842909a4bbd56385639c32db1e9264c697d2c7daf9f816fd3dfaba4a220c44
|
|
BLAKE2b-256 checksum How to use checksums |
2a438c6c23947c3f33959631515c832e8d568469ae614ad85f0a87e1551d81d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Release files / winvers-0.1.6-py2.py3-none-any.whl
| Download URL | winvers-0.1.6-py2.py3-none-any.whl |
|---|---|
| Size | 19.1 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
0605801d5f87a13d0c4189648e227b8605bc3b708dd71637cde883c00d593857
|
|
BLAKE2b-256 checksum How to use checksums |
e00e95829d07292cf12689b7a618fed736d81ac4e6fae87ce484e0997f7b3de3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.8.1
|
Security for winvers 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.