hwid 0.2.0__tar.gz → 0.3.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {hwid-0.2.0 → hwid-0.3.0}/.gitignore +103 -38
- hwid-0.3.0/PKG-INFO +233 -0
- hwid-0.2.0/PKG-INFO → hwid-0.3.0/README.md +68 -39
- hwid-0.3.0/docs/examples/cli_usage.py +22 -0
- hwid-0.3.0/docs/examples/version_lookup.py +14 -0
- hwid-0.3.0/pyproject.toml +817 -0
- hwid-0.3.0/src/hwid/__main__.py +24 -0
- hwid-0.3.0/src/hwid/__metadata__.py +4 -0
- {hwid-0.2.0 → hwid-0.3.0}/src/hwid/_version.py +2 -2
- hwid-0.3.0/src/hwid/cli/__init__.py +5 -0
- hwid-0.3.0/src/hwid/cli/app.py +127 -0
- hwid-0.3.0/src/hwid/core/__init__.py +6 -0
- hwid-0.3.0/src/hwid/core/app.py +119 -0
- hwid-0.3.0/src/hwid/core/config.py +68 -0
- hwid-0.3.0/src/hwid/core/dirs.py +66 -0
- {hwid-0.2.0/src/hwid → hwid-0.3.0/src/hwid/core}/exceptions.py +3 -0
- hwid-0.3.0/src/hwid/core/impl/darwin.py +24 -0
- hwid-0.3.0/src/hwid/core/impl/linux.py +30 -0
- {hwid-0.2.0/src/hwid → hwid-0.3.0/src/hwid/core}/impl/win32.py +2 -0
- hwid-0.3.0/src/hwid/core/logging_setup.py +114 -0
- hwid-0.2.0/src/hwid/core.py → hwid-0.3.0/src/hwid/core/resolution.py +4 -2
- hwid-0.3.0/src/hwid/utils/__init__.py +1 -0
- hwid-0.3.0/src/hwid/utils/app.py +1 -0
- hwid-0.3.0/tests/__init__.py +1 -0
- hwid-0.3.0/tests/cli/__init__.py +1 -0
- hwid-0.3.0/tests/cli/test_app.py +67 -0
- hwid-0.3.0/tests/conftest.py +94 -0
- hwid-0.3.0/tests/core/__init__.py +1 -0
- hwid-0.3.0/tests/core/impl/__init__.py +1 -0
- hwid-0.3.0/tests/core/impl/test_darwin.py +36 -0
- hwid-0.3.0/tests/core/impl/test_linux.py +50 -0
- hwid-0.3.0/tests/core/impl/test_win32.py +28 -0
- hwid-0.3.0/tests/core/test_app.py +89 -0
- hwid-0.3.0/tests/core/test_config.py +68 -0
- hwid-0.3.0/tests/core/test_dirs.py +43 -0
- hwid-0.3.0/tests/core/test_logging_setup.py +140 -0
- hwid-0.3.0/tests/core/test_resolution.py +77 -0
- hwid-0.3.0/tests/test_docs_examples.py +39 -0
- hwid-0.3.0/tests/test_main.py +21 -0
- hwid-0.3.0/tests/test_smoke.py +8 -0
- hwid-0.2.0/.github/FUNDING.yml +0 -13
- hwid-0.2.0/.github/ISSUE_TEMPLATE/bug_report.md +0 -27
- hwid-0.2.0/.github/ISSUE_TEMPLATE/config.yml +0 -6
- hwid-0.2.0/.github/ISSUE_TEMPLATE/feature_request.md +0 -23
- hwid-0.2.0/.github/PULL_REQUEST/pull_request_template.md +0 -41
- hwid-0.2.0/.github/dependabot.yml +0 -15
- hwid-0.2.0/.github/release-drafter.yml +0 -117
- hwid-0.2.0/.github/workflows/cd.yml +0 -47
- hwid-0.2.0/.github/workflows/check-pr-title.yml +0 -39
- hwid-0.2.0/.github/workflows/ci.yml +0 -60
- hwid-0.2.0/.github/workflows/docs-deploy.yml +0 -33
- hwid-0.2.0/.github/workflows/release-drafter.yml +0 -25
- hwid-0.2.0/.pre-commit-config.yaml +0 -53
- hwid-0.2.0/.python-version +0 -1
- hwid-0.2.0/CHANGELOG.md +0 -3
- hwid-0.2.0/README.md +0 -131
- hwid-0.2.0/docs/changelog.md +0 -76
- hwid-0.2.0/docs/index.md +0 -130
- hwid-0.2.0/docs/reference.md +0 -5
- hwid-0.2.0/examples/hwid-cli-with-typer/__init__.py +0 -4
- hwid-0.2.0/examples/hwid-cli-with-typer/main.py +0 -26
- hwid-0.2.0/examples/hwid-cli-with-typer/pyproject.toml +0 -17
- hwid-0.2.0/examples/simple-application/__init__.py +0 -4
- hwid-0.2.0/examples/simple-application/app.py +0 -25
- hwid-0.2.0/examples/simple-application/information.json +0 -3
- hwid-0.2.0/examples/simple-application/pyproject.toml +0 -14
- hwid-0.2.0/mkdocs.yml +0 -60
- hwid-0.2.0/pyproject.toml +0 -150
- hwid-0.2.0/renovate.json +0 -9
- hwid-0.2.0/requirements.docs.txt +0 -2
- hwid-0.2.0/src/hwid/__main__.py +0 -9
- hwid-0.2.0/src/hwid/impl/darwin.py +0 -17
- hwid-0.2.0/src/hwid/impl/linux.py +0 -16
- hwid-0.2.0/src/hwid/logger.py +0 -9
- hwid-0.2.0/src/hwid/main.py +0 -14
- hwid-0.2.0/uv.lock +0 -7
- {hwid-0.2.0 → hwid-0.3.0}/LICENSE +0 -0
- {hwid-0.2.0 → hwid-0.3.0}/src/hwid/__init__.py +0 -0
- {hwid-0.2.0/src/hwid → hwid-0.3.0/src/hwid/core}/impl/__init__.py +0 -0
- {hwid-0.2.0 → hwid-0.3.0}/src/hwid/py.typed +0 -0
|
@@ -1,17 +1,19 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
# >>> cobo:begin >>>
|
|
2
|
+
# Generated by cobo (github.com/hasansezertasan/cobo)
|
|
3
|
+
# gitignore/macOS@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/macOS.gitignore
|
|
4
4
|
# General
|
|
5
5
|
.DS_Store
|
|
6
|
+
.localized
|
|
7
|
+
__MACOSX/
|
|
6
8
|
.AppleDouble
|
|
7
9
|
.LSOverride
|
|
8
10
|
Icon[
|
|
9
11
|
]
|
|
10
12
|
|
|
11
|
-
#
|
|
13
|
+
# Resource forks
|
|
12
14
|
._*
|
|
13
15
|
|
|
14
|
-
# Files that might appear in the root of a volume
|
|
16
|
+
# Files and directories that might appear in the root of a volume
|
|
15
17
|
.DocumentRevisions-V100
|
|
16
18
|
.fseventsd
|
|
17
19
|
.Spotlight-V100
|
|
@@ -19,6 +21,16 @@ Icon[
|
|
|
19
21
|
.Trashes
|
|
20
22
|
.VolumeIcon.icns
|
|
21
23
|
.com.apple.timemachine.donotpresent
|
|
24
|
+
.com.apple.timemachine.supported
|
|
25
|
+
.PKInstallSandboxManager
|
|
26
|
+
.PKInstallSandboxManager-SystemSoftware
|
|
27
|
+
.hotfiles.btree
|
|
28
|
+
.vol
|
|
29
|
+
.file
|
|
30
|
+
.disk_label*
|
|
31
|
+
lost+found
|
|
32
|
+
.HFS+ Private Directory Data[
|
|
33
|
+
]
|
|
22
34
|
|
|
23
35
|
# Directories potentially created on remote AFP share
|
|
24
36
|
.AppleDB
|
|
@@ -26,9 +38,31 @@ Icon[
|
|
|
26
38
|
Network Trash Folder
|
|
27
39
|
Temporary Items
|
|
28
40
|
.apdisk
|
|
29
|
-
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
30
|
-
### https://raw.github.com/github/gitignore/1d4819b2dc2c30732cb4db8cdb406ee4c2aba50b/Global/Windows.gitignore
|
|
31
41
|
|
|
42
|
+
# Mac OS 6 to 9
|
|
43
|
+
Desktop DB
|
|
44
|
+
Desktop DF
|
|
45
|
+
TheFindByContentFolder
|
|
46
|
+
TheVolumeSettingsFolder
|
|
47
|
+
.FBCIndex
|
|
48
|
+
.FBCSemaphoreFile
|
|
49
|
+
.FBCLockFolder
|
|
50
|
+
|
|
51
|
+
# Quota system
|
|
52
|
+
.quota.group
|
|
53
|
+
.quota.user
|
|
54
|
+
.quota.ops.group
|
|
55
|
+
.quota.ops.user
|
|
56
|
+
|
|
57
|
+
# TimeMachine
|
|
58
|
+
Backups.backupdb
|
|
59
|
+
.MobileBackups
|
|
60
|
+
.MobileBackups.trash
|
|
61
|
+
MobileBackups.trash
|
|
62
|
+
tmbootpicker.efi
|
|
63
|
+
|
|
64
|
+
# Generated by cobo (github.com/hasansezertasan/cobo)
|
|
65
|
+
# gitignore/Windows@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/Windows.gitignore
|
|
32
66
|
# Windows thumbnail cache files
|
|
33
67
|
Thumbs.db
|
|
34
68
|
Thumbs.db:encryptable
|
|
@@ -53,9 +87,9 @@ $RECYCLE.BIN/
|
|
|
53
87
|
|
|
54
88
|
# Windows shortcuts
|
|
55
89
|
*.lnk
|
|
56
|
-
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
57
|
-
### https://raw.github.com/github/gitignore/1d4819b2dc2c30732cb4db8cdb406ee4c2aba50b/Global/Linux.gitignore
|
|
58
90
|
|
|
91
|
+
# Generated by cobo (github.com/hasansezertasan/cobo)
|
|
92
|
+
# gitignore/Linux@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/Linux.gitignore
|
|
59
93
|
*~
|
|
60
94
|
|
|
61
95
|
# temporary files which can be created if a process still has a handle open of a deleted file
|
|
@@ -72,9 +106,10 @@ $RECYCLE.BIN/
|
|
|
72
106
|
|
|
73
107
|
# Log files created by default by the nohup command
|
|
74
108
|
nohup.out
|
|
75
|
-
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
76
|
-
### https://raw.github.com/github/gitignore/1d4819b2dc2c30732cb4db8cdb406ee4c2aba50b/Global/VisualStudioCode.gitignore
|
|
77
109
|
|
|
110
|
+
# Generated by cobo (github.com/hasansezertasan/cobo)
|
|
111
|
+
# gitignore/VisualStudioCode@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Global/VisualStudioCode.gitignore
|
|
112
|
+
# Visual Studio Code
|
|
78
113
|
.vscode/*
|
|
79
114
|
!.vscode/settings.json
|
|
80
115
|
!.vscode/tasks.json
|
|
@@ -85,9 +120,9 @@ nohup.out
|
|
|
85
120
|
|
|
86
121
|
# Built Visual Studio Code Extensions
|
|
87
122
|
*.vsix
|
|
88
|
-
### Generated by gibo (https://github.com/simonwhitaker/gibo)
|
|
89
|
-
### https://raw.github.com/github/gitignore/1d4819b2dc2c30732cb4db8cdb406ee4c2aba50b/Python.gitignore
|
|
90
123
|
|
|
124
|
+
# Generated by cobo (github.com/hasansezertasan/cobo)
|
|
125
|
+
# gitignore/Python@57286c3 — https://raw.githubusercontent.com/github/gitignore/57286c3887203259752b747db94e6c3ad10ec53d/Python.gitignore
|
|
91
126
|
# Byte-compiled / optimized / DLL files
|
|
92
127
|
__pycache__/
|
|
93
128
|
*.py[codz]
|
|
@@ -117,8 +152,8 @@ share/python-wheels/
|
|
|
117
152
|
MANIFEST
|
|
118
153
|
|
|
119
154
|
# PyInstaller
|
|
120
|
-
#
|
|
121
|
-
#
|
|
155
|
+
# Usually these files are written by a python script from a template
|
|
156
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
122
157
|
*.manifest
|
|
123
158
|
*.spec
|
|
124
159
|
|
|
@@ -137,6 +172,7 @@ nosetests.xml
|
|
|
137
172
|
coverage.xml
|
|
138
173
|
*.cover
|
|
139
174
|
*.py.cover
|
|
175
|
+
*.lcov
|
|
140
176
|
.hypothesis/
|
|
141
177
|
.pytest_cache/
|
|
142
178
|
cover/
|
|
@@ -182,45 +218,59 @@ ipython_config.py
|
|
|
182
218
|
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
183
219
|
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
184
220
|
# install all needed dependencies.
|
|
185
|
-
#Pipfile.lock
|
|
221
|
+
# Pipfile.lock
|
|
186
222
|
|
|
187
223
|
# UV
|
|
188
224
|
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
|
|
189
225
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
190
226
|
# commonly ignored for libraries.
|
|
191
|
-
#uv.lock
|
|
227
|
+
# uv.lock
|
|
192
228
|
|
|
193
229
|
# poetry
|
|
194
230
|
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
195
231
|
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
196
232
|
# commonly ignored for libraries.
|
|
197
233
|
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
198
|
-
#poetry.lock
|
|
199
|
-
#poetry.toml
|
|
234
|
+
# poetry.lock
|
|
235
|
+
# poetry.toml
|
|
200
236
|
|
|
201
237
|
# pdm
|
|
202
238
|
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
203
239
|
# pdm recommends including project-wide configuration in pdm.toml, but excluding .pdm-python.
|
|
204
240
|
# https://pdm-project.org/en/latest/usage/project/#working-with-version-control
|
|
205
|
-
#pdm.lock
|
|
206
|
-
#pdm.toml
|
|
241
|
+
# pdm.lock
|
|
242
|
+
# pdm.toml
|
|
207
243
|
.pdm-python
|
|
208
244
|
.pdm-build/
|
|
209
245
|
|
|
210
246
|
# pixi
|
|
211
247
|
# Similar to Pipfile.lock, it is generally recommended to include pixi.lock in version control.
|
|
212
|
-
#pixi.lock
|
|
248
|
+
# pixi.lock
|
|
213
249
|
# Pixi creates a virtual environment in the .pixi directory, just like venv module creates one
|
|
214
250
|
# in the .venv directory. It is recommended not to include this directory in version control.
|
|
215
|
-
.pixi
|
|
251
|
+
.pixi/*
|
|
252
|
+
!.pixi/config.toml
|
|
216
253
|
|
|
217
254
|
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
218
255
|
__pypackages__/
|
|
219
256
|
|
|
220
257
|
# Celery stuff
|
|
221
|
-
celerybeat-schedule
|
|
258
|
+
celerybeat-schedule*
|
|
222
259
|
celerybeat.pid
|
|
223
260
|
|
|
261
|
+
# Redis
|
|
262
|
+
*.rdb
|
|
263
|
+
*.aof
|
|
264
|
+
*.pid
|
|
265
|
+
|
|
266
|
+
# RabbitMQ
|
|
267
|
+
mnesia/
|
|
268
|
+
rabbitmq/
|
|
269
|
+
rabbitmq-data/
|
|
270
|
+
|
|
271
|
+
# ActiveMQ
|
|
272
|
+
activemq-data/
|
|
273
|
+
|
|
224
274
|
# SageMath parsed files
|
|
225
275
|
*.sage.py
|
|
226
276
|
|
|
@@ -259,24 +309,26 @@ dmypy.json
|
|
|
259
309
|
cython_debug/
|
|
260
310
|
|
|
261
311
|
# PyCharm
|
|
262
|
-
#
|
|
263
|
-
#
|
|
264
|
-
#
|
|
265
|
-
#
|
|
266
|
-
|
|
312
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
313
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
314
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
315
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
316
|
+
# .idea/
|
|
267
317
|
|
|
268
318
|
# Abstra
|
|
269
|
-
#
|
|
270
|
-
#
|
|
271
|
-
#
|
|
319
|
+
# Abstra is an AI-powered process automation framework.
|
|
320
|
+
# Ignore directories containing user credentials, local state, and settings.
|
|
321
|
+
# Learn more at https://abstra.io/docs
|
|
272
322
|
.abstra/
|
|
273
323
|
|
|
274
324
|
# Visual Studio Code
|
|
275
|
-
#
|
|
276
|
-
#
|
|
277
|
-
#
|
|
278
|
-
#
|
|
325
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
326
|
+
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
327
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
328
|
+
# you could uncomment the following to ignore the entire vscode folder
|
|
279
329
|
# .vscode/
|
|
330
|
+
# Temporary file for partial code execution
|
|
331
|
+
tempCodeRunnerFile.py
|
|
280
332
|
|
|
281
333
|
# Ruff stuff:
|
|
282
334
|
.ruff_cache/
|
|
@@ -291,5 +343,18 @@ __marimo__/
|
|
|
291
343
|
|
|
292
344
|
# Streamlit
|
|
293
345
|
.streamlit/secrets.toml
|
|
294
|
-
|
|
295
|
-
|
|
346
|
+
# <<< cobo:end sha256=ad0ebe7dcb4b7d3ea51c692fbd995c90642a0f84ab813436d7e3da3b1610be93 <<<
|
|
347
|
+
|
|
348
|
+
### Generated by the author
|
|
349
|
+
# NOTE: the sealed block above LF-normalizes the macOS `Icon[<CR>]` and
|
|
350
|
+
# `.HFS+ Private Directory Data[<CR>]` char-classes into `Icon[`/`]` (a known
|
|
351
|
+
# cobo `eol=lf` tradeoff — see ADR-012 and cobo#124). These legacy HFS
|
|
352
|
+
# resource-fork files are rarely committed; the full fix needs both cobo#124 and
|
|
353
|
+
# a Copier render carve-out (Jinja strips the CR at scaffold time too).
|
|
354
|
+
# Version manifest generated into each docs build by tools/build_docs.py from the
|
|
355
|
+
# gh-pages branch listing (ADR-027); regenerated, never committed.
|
|
356
|
+
docs/_static/versions.json
|
|
357
|
+
# MegaLinter local report output (REPORT_OUTPUT_FOLDER in .mega-linter.yml)
|
|
358
|
+
megalinter-reports/
|
|
359
|
+
src/**/_version.py
|
|
360
|
+
mise.local.toml
|
hwid-0.3.0/PKG-INFO
ADDED
|
@@ -0,0 +1,233 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: hwid
|
|
3
|
+
Version: 0.3.0
|
|
4
|
+
Summary: Extract the `hwid` on Windows, Linux, Mac. Cross-platform using Python, native OS detection.
|
|
5
|
+
Project-URL: changelog, https://github.com/hasansezertasan/hwid/blob/main/CHANGELOG.md
|
|
6
|
+
Project-URL: documentation, https://hasansezertasan.github.io/hwid
|
|
7
|
+
Project-URL: homepage, https://github.com/hasansezertasan/hwid
|
|
8
|
+
Project-URL: issues, https://github.com/hasansezertasan/hwid/issues
|
|
9
|
+
Project-URL: releasenotes, https://github.com/hasansezertasan/hwid/releases
|
|
10
|
+
Project-URL: source, https://github.com/hasansezertasan/hwid.git
|
|
11
|
+
Author-email: Hasan Sezer Taşan <hasansezertasan@gmail.com>
|
|
12
|
+
Maintainer-email: Hasan Sezer Taşan <hasansezertasan@gmail.com>
|
|
13
|
+
License-Expression: MIT
|
|
14
|
+
License-File: LICENSE
|
|
15
|
+
Keywords: automation,basedpyright,ci-cd,cli,command-line,coverage,fingerprint,fingerprinting,github-actions,hardware,hatch,hwid,id,identification,identifier,license,licensing,linting,machine,metadata,modern-python,mypy,package,prek,pypi,pytest,python,release-automation,ruff,sphinx,testing,tox,type-hints,typed,unique,uv
|
|
16
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
17
|
+
Classifier: Environment :: Console
|
|
18
|
+
Classifier: Intended Audience :: Developers
|
|
19
|
+
Classifier: Intended Audience :: Information Technology
|
|
20
|
+
Classifier: Intended Audience :: System Administrators
|
|
21
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
22
|
+
Classifier: Natural Language :: English
|
|
23
|
+
Classifier: Operating System :: OS Independent
|
|
24
|
+
Classifier: Programming Language :: Python
|
|
25
|
+
Classifier: Programming Language :: Python :: 3
|
|
26
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
27
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
28
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
29
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
30
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
31
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
32
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
33
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
34
|
+
Classifier: Topic :: Software Development
|
|
35
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
36
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
37
|
+
Classifier: Topic :: Utilities
|
|
38
|
+
Classifier: Typing :: Typed
|
|
39
|
+
Requires-Python: >=3.10
|
|
40
|
+
Description-Content-Type: text/markdown
|
|
41
|
+
|
|
42
|
+
# hwid
|
|
43
|
+
|
|
44
|
+
[](https://github.com/hasansezertasan/hwid/actions/workflows/ci.yml)
|
|
45
|
+
[](https://codecov.io/gh/hasansezertasan/hwid)
|
|
46
|
+
[](https://pypi.org/project/hwid)
|
|
47
|
+
[](https://pypi.org/project/hwid)
|
|
48
|
+
[](https://github.com/hasansezertasan/hwid/blob/main/LICENSE)
|
|
49
|
+
[](https://github.com/hasansezertasan/hwid)
|
|
50
|
+
|
|
51
|
+
[](https://pepy.tech/project/hwid)
|
|
52
|
+
[](https://pepy.tech/project/hwid)
|
|
53
|
+
[](https://pepy.tech/project/hwid)
|
|
54
|
+
|
|
55
|
+
Extract the `hwid` on Windows, Linux, Mac. Cross-platform using Python, native OS detection.
|
|
56
|
+
|
|
57
|
+
---
|
|
58
|
+
|
|
59
|
+
## Table of Contents
|
|
60
|
+
|
|
61
|
+
- [Table of Contents](#table-of-contents)
|
|
62
|
+
- [Installation](#installation)
|
|
63
|
+
- [Usage](#usage)
|
|
64
|
+
- [Motivation](#motivation)
|
|
65
|
+
- [Features](#features)
|
|
66
|
+
- [Warning](#warning)
|
|
67
|
+
- [Author](#author)
|
|
68
|
+
- [Disclaimer](#disclaimer)
|
|
69
|
+
- [License](#license)
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
``` sh
|
|
74
|
+
pip install hwid
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
Install with [Homebrew](https://brew.sh) (macOS/Linux):
|
|
78
|
+
|
|
79
|
+
```sh
|
|
80
|
+
brew install hasansezertasan/tap/hwid
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Install with [Scoop](https://scoop.sh) (Windows):
|
|
84
|
+
|
|
85
|
+
```sh
|
|
86
|
+
scoop bucket add hasansezertasan https://github.com/hasansezertasan/scoop-bucket
|
|
87
|
+
scoop install hasansezertasan/hwid
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Verify the installation
|
|
91
|
+
|
|
92
|
+
The package root is importable after installation:
|
|
93
|
+
|
|
94
|
+
```pycon
|
|
95
|
+
>>> from hwid import __doc__
|
|
96
|
+
>>> isinstance(__doc__, str)
|
|
97
|
+
True
|
|
98
|
+
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
<!--
|
|
102
|
+
TODO @hasansezertasan: Add project-specific, runnable examples here.
|
|
103
|
+
|
|
104
|
+
pytest runs the pycon examples in this file (--doctest-glob=README.md).
|
|
105
|
+
doctest cannot see Markdown and ends an example's expected output at the first
|
|
106
|
+
blank line, so leave a blank line before every closing fence -- as the example
|
|
107
|
+
above does. Without it the closing delimiter is read as part of the expected
|
|
108
|
+
output and the example fails ("Expected: 2 / Got: 2"). Examples with no output
|
|
109
|
+
line at all need the blank line too.
|
|
110
|
+
-->
|
|
111
|
+
## Usage
|
|
112
|
+
|
|
113
|
+
### As a Module
|
|
114
|
+
|
|
115
|
+
```python
|
|
116
|
+
import hwid
|
|
117
|
+
|
|
118
|
+
print(hwid.get_hwid())
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
### As a CLI Tool
|
|
122
|
+
|
|
123
|
+
The bare command prints the machine's hardware ID:
|
|
124
|
+
|
|
125
|
+
```sh
|
|
126
|
+
uvx hwid
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
Or, once installed, invoke the console script:
|
|
130
|
+
|
|
131
|
+
```sh
|
|
132
|
+
hwid # prints the hardware ID
|
|
133
|
+
hwid version # prints the package version
|
|
134
|
+
hwid info # prints version, Python, and platform information
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Motivation
|
|
138
|
+
|
|
139
|
+
TL;DR I don't want to copy and paste it again...
|
|
140
|
+
|
|
141
|
+
I have created a bunch of desktop applications for Windows. I needed a way to license my applications for my users to use it without distributing to other people. I decided to use the hwid of the computer to license my applications. I needed a way to get the hwid of the computer, so I created this module. It has only one purpose: getting the hwid of the computer. It is cross-platform and does not require any external dependencies.
|
|
142
|
+
|
|
143
|
+
## Features
|
|
144
|
+
|
|
145
|
+
Library:
|
|
146
|
+
|
|
147
|
+
- Cross-platform (Windows, Linux, macOS) with native OS detection
|
|
148
|
+
- No external runtime dependencies
|
|
149
|
+
- Usable as a module or a CLI
|
|
150
|
+
|
|
151
|
+
Engineering:
|
|
152
|
+
|
|
153
|
+
- **Type Safety**: Full type hints checked by mypy, basedpyright, ty, pyrefly, and zuban
|
|
154
|
+
- **Code Quality**: Comprehensive linting and formatting with ruff, plus architecture-contract enforcement with import-linter
|
|
155
|
+
- **Testing**: pytest with coverage reporting and parallel execution
|
|
156
|
+
- **Documentation**: Sphinx documentation with the Shibuya theme, GitHub Pages deployment, and live per-PR documentation previews
|
|
157
|
+
- **CI/CD**: Automated testing, building, and publishing across multiple platforms
|
|
158
|
+
- **Security**: CodeQL, OpenSSF Scorecard, dependency review, secret scanning (gitleaks), dependency auditing (pip-audit), GitHub Actions static analysis (zizmor — a blocking prek/CI gate plus a Security-tab dashboard, over hardened least-privilege workflows), and a CycloneDX SBOM attached to every release
|
|
159
|
+
- **Managed `.gitignore`**: kept in sync with the upstream [github/gitignore](https://github.com/github/gitignore) templates by [cobo](https://github.com/hasansezertasan/cobo), with a weekly drift check
|
|
160
|
+
- **Modern Python**: uv for dependency management, hatch for building
|
|
161
|
+
|
|
162
|
+
## Warning
|
|
163
|
+
|
|
164
|
+
I do not recommend using this module for licensing purposes all alone. You can use it as a part of your licensing system.
|
|
165
|
+
|
|
166
|
+
If you are using server-client architecture, you can send the encrypted hwid to the server and check if it is valid. But keep in mind, It's easy to intercept the http requests with [mitmproxy] or other tools.
|
|
167
|
+
|
|
168
|
+
If you are using a local licensing system, you can encrypt the hwid and store it in a file. Then you can check if the encrypted hwid is valid. You can use [pyarmor] to obfuscate your code. It will make it harder to reverse engineer your code. Here is a [NeuralNine Tutorial][neuralnine-tutorial] using [Oxyry][oxyry]
|
|
169
|
+
|
|
170
|
+
<!-- xc-heading -->
|
|
171
|
+
## Development
|
|
172
|
+
|
|
173
|
+
Clone the repository and cd into the project directory:
|
|
174
|
+
|
|
175
|
+
```sh
|
|
176
|
+
git clone https://github.com/hasansezertasan/hwid
|
|
177
|
+
cd hwid
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
The commands below can also be executed using the [xc task runner](https://xcfile.dev/), which combines the usage instructions with the actual commands. Simply run `xc`, it will popup an interactive menu with all available tasks.
|
|
181
|
+
|
|
182
|
+
### `checks`
|
|
183
|
+
|
|
184
|
+
Run all checks to ensure code quality:
|
|
185
|
+
|
|
186
|
+
```sh
|
|
187
|
+
uvx "validate-pyproject[all]" pyproject.toml
|
|
188
|
+
uvx typos
|
|
189
|
+
uvx vulture src
|
|
190
|
+
uvx ruff check
|
|
191
|
+
uvx taplo lint pyproject.toml
|
|
192
|
+
uvx ruff format
|
|
193
|
+
uvx taplo format pyproject.toml
|
|
194
|
+
uvx mypy src
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### `docs:serve`
|
|
198
|
+
|
|
199
|
+
Serve the documentation locally:
|
|
200
|
+
|
|
201
|
+
```sh
|
|
202
|
+
uv run --locked tox run -e docs-server
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
### `docs:build`
|
|
206
|
+
|
|
207
|
+
Build the documentation locally:
|
|
208
|
+
|
|
209
|
+
```sh
|
|
210
|
+
uv run --locked tox run -e docs-build
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
## Releasing
|
|
214
|
+
|
|
215
|
+
Versioning and releases are automated with [release-please](https://github.com/googleapis/release-please), driven by [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) PR titles squash-merged into `main`. release-please maintains a release PR that bumps the version and `CHANGELOG.md`; merging it tags the release and publishes to PyPI. See the [Contributing Guidelines](./.github/CONTRIBUTING.md#releasing) for the commit conventions, and the [Repository setup](./docs/maintaining/setup.rst) guide for one-time configuration and optional post-launch integrations such as a social preview, downstream packaging, and Repology.
|
|
216
|
+
|
|
217
|
+
## Author
|
|
218
|
+
|
|
219
|
+
- [hasansezertasan](https://www.github.com/hasansezertasan)
|
|
220
|
+
|
|
221
|
+
## Disclaimer
|
|
222
|
+
|
|
223
|
+
This module is not intended to be used for malicious purposes. The author is not responsible for any damage caused by this module. Use at your own risk.
|
|
224
|
+
|
|
225
|
+
## License
|
|
226
|
+
|
|
227
|
+
`hwid` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license.
|
|
228
|
+
|
|
229
|
+
<!-- Links -->
|
|
230
|
+
[mitmproxy]: https://mitmproxy.org/
|
|
231
|
+
[pyarmor]:https://github.com/dashingsoft/pyarmor
|
|
232
|
+
[neuralnine-tutorial]: https://www.youtube.com/watch?v=k4bLhDolLf0
|
|
233
|
+
[oxyry]: https://pyob.oxyry.com/
|
|
@@ -1,38 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: hwid
|
|
3
|
-
Version: 0.2.0
|
|
4
|
-
Summary: Extract the `hwid` on Windows, Linux, Mac. Cross-platform using Python, native OS detection.
|
|
5
|
-
Project-URL: documentation, https://hasansezertasan.github.io/hwid
|
|
6
|
-
Project-URL: repository, https://github.com/hasansezertasan/hwid
|
|
7
|
-
Project-URL: homepage, https://github.com/hasansezertasan/hwid
|
|
8
|
-
Author-email: Hasan Sezer Taşan <hasansezertasan@gmail.com>
|
|
9
|
-
Maintainer-email: Hasan Sezer Taşan <hasansezertasan@gmail.com>
|
|
10
|
-
License: MIT
|
|
11
|
-
License-File: LICENSE
|
|
12
|
-
Keywords: fingerprint,fingerprinting,hardware,hwid,id,identification,identifier,license,licensing,machine,unique
|
|
13
|
-
Classifier: Development Status :: 5 - Production/Stable
|
|
14
|
-
Classifier: Environment :: Console
|
|
15
|
-
Classifier: Intended Audience :: Developers
|
|
16
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
-
Classifier: Operating System :: OS Independent
|
|
18
|
-
Classifier: Programming Language :: Python
|
|
19
|
-
Classifier: Programming Language :: Python :: 3
|
|
20
|
-
Classifier: Programming Language :: Python :: 3 :: Only
|
|
21
|
-
Classifier: Programming Language :: Python :: 3.6
|
|
22
|
-
Classifier: Programming Language :: Python :: 3.7
|
|
23
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
24
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
25
|
-
Classifier: Programming Language :: Python :: 3.10
|
|
26
|
-
Classifier: Programming Language :: Python :: 3.11
|
|
27
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
28
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
29
|
-
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
30
|
-
Requires-Python: <4.0,>=3.0
|
|
31
|
-
Description-Content-Type: text/markdown
|
|
32
|
-
|
|
33
1
|
# hwid
|
|
34
2
|
|
|
35
|
-
[](https://github.com/hasansezertasan/hwid/actions/workflows/ci.yml)
|
|
36
4
|
[](https://codecov.io/gh/hasansezertasan/hwid)
|
|
37
5
|
[](https://pypi.org/project/hwid)
|
|
38
6
|
[](https://pypi.org/project/hwid)
|
|
@@ -65,21 +33,66 @@ Extract the `hwid` on Windows, Linux, Mac. Cross-platform using Python, native O
|
|
|
65
33
|
pip install hwid
|
|
66
34
|
```
|
|
67
35
|
|
|
36
|
+
Install with [Homebrew](https://brew.sh) (macOS/Linux):
|
|
37
|
+
|
|
38
|
+
```sh
|
|
39
|
+
brew install hasansezertasan/tap/hwid
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Install with [Scoop](https://scoop.sh) (Windows):
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
scoop bucket add hasansezertasan https://github.com/hasansezertasan/scoop-bucket
|
|
46
|
+
scoop install hasansezertasan/hwid
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Verify the installation
|
|
50
|
+
|
|
51
|
+
The package root is importable after installation:
|
|
52
|
+
|
|
53
|
+
```pycon
|
|
54
|
+
>>> from hwid import __doc__
|
|
55
|
+
>>> isinstance(__doc__, str)
|
|
56
|
+
True
|
|
57
|
+
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
<!--
|
|
61
|
+
TODO @hasansezertasan: Add project-specific, runnable examples here.
|
|
62
|
+
|
|
63
|
+
pytest runs the pycon examples in this file (--doctest-glob=README.md).
|
|
64
|
+
doctest cannot see Markdown and ends an example's expected output at the first
|
|
65
|
+
blank line, so leave a blank line before every closing fence -- as the example
|
|
66
|
+
above does. Without it the closing delimiter is read as part of the expected
|
|
67
|
+
output and the example fails ("Expected: 2 / Got: 2"). Examples with no output
|
|
68
|
+
line at all need the blank line too.
|
|
69
|
+
-->
|
|
68
70
|
## Usage
|
|
69
71
|
|
|
70
72
|
### As a Module
|
|
71
73
|
|
|
72
74
|
```python
|
|
73
75
|
import hwid
|
|
76
|
+
|
|
74
77
|
print(hwid.get_hwid())
|
|
75
78
|
```
|
|
76
79
|
|
|
77
80
|
### As a CLI Tool
|
|
78
81
|
|
|
82
|
+
The bare command prints the machine's hardware ID:
|
|
83
|
+
|
|
79
84
|
```sh
|
|
80
85
|
uvx hwid
|
|
81
86
|
```
|
|
82
87
|
|
|
88
|
+
Or, once installed, invoke the console script:
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
hwid # prints the hardware ID
|
|
92
|
+
hwid version # prints the package version
|
|
93
|
+
hwid info # prints version, Python, and platform information
|
|
94
|
+
```
|
|
95
|
+
|
|
83
96
|
## Motivation
|
|
84
97
|
|
|
85
98
|
TL;DR I don't want to copy and paste it again...
|
|
@@ -88,10 +101,22 @@ I have created a bunch of desktop applications for Windows. I needed a way to li
|
|
|
88
101
|
|
|
89
102
|
## Features
|
|
90
103
|
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
-
|
|
104
|
+
Library:
|
|
105
|
+
|
|
106
|
+
- Cross-platform (Windows, Linux, macOS) with native OS detection
|
|
107
|
+
- No external runtime dependencies
|
|
108
|
+
- Usable as a module or a CLI
|
|
109
|
+
|
|
110
|
+
Engineering:
|
|
111
|
+
|
|
112
|
+
- **Type Safety**: Full type hints checked by mypy, basedpyright, ty, pyrefly, and zuban
|
|
113
|
+
- **Code Quality**: Comprehensive linting and formatting with ruff, plus architecture-contract enforcement with import-linter
|
|
114
|
+
- **Testing**: pytest with coverage reporting and parallel execution
|
|
115
|
+
- **Documentation**: Sphinx documentation with the Shibuya theme, GitHub Pages deployment, and live per-PR documentation previews
|
|
116
|
+
- **CI/CD**: Automated testing, building, and publishing across multiple platforms
|
|
117
|
+
- **Security**: CodeQL, OpenSSF Scorecard, dependency review, secret scanning (gitleaks), dependency auditing (pip-audit), GitHub Actions static analysis (zizmor — a blocking prek/CI gate plus a Security-tab dashboard, over hardened least-privilege workflows), and a CycloneDX SBOM attached to every release
|
|
118
|
+
- **Managed `.gitignore`**: kept in sync with the upstream [github/gitignore](https://github.com/github/gitignore) templates by [cobo](https://github.com/hasansezertasan/cobo), with a weekly drift check
|
|
119
|
+
- **Modern Python**: uv for dependency management, hatch for building
|
|
95
120
|
|
|
96
121
|
## Warning
|
|
97
122
|
|
|
@@ -133,7 +158,7 @@ uvx mypy src
|
|
|
133
158
|
Serve the documentation locally:
|
|
134
159
|
|
|
135
160
|
```sh
|
|
136
|
-
|
|
161
|
+
uv run --locked tox run -e docs-server
|
|
137
162
|
```
|
|
138
163
|
|
|
139
164
|
### `docs:build`
|
|
@@ -141,9 +166,13 @@ uvx --with-requirements requirements.docs.txt mkdocs serve
|
|
|
141
166
|
Build the documentation locally:
|
|
142
167
|
|
|
143
168
|
```sh
|
|
144
|
-
|
|
169
|
+
uv run --locked tox run -e docs-build
|
|
145
170
|
```
|
|
146
171
|
|
|
172
|
+
## Releasing
|
|
173
|
+
|
|
174
|
+
Versioning and releases are automated with [release-please](https://github.com/googleapis/release-please), driven by [Conventional Commit](https://www.conventionalcommits.org/en/v1.0.0/) PR titles squash-merged into `main`. release-please maintains a release PR that bumps the version and `CHANGELOG.md`; merging it tags the release and publishes to PyPI. See the [Contributing Guidelines](./.github/CONTRIBUTING.md#releasing) for the commit conventions, and the [Repository setup](./docs/maintaining/setup.rst) guide for one-time configuration and optional post-launch integrations such as a social preview, downstream packaging, and Repology.
|
|
175
|
+
|
|
147
176
|
## Author
|
|
148
177
|
|
|
149
178
|
- [hasansezertasan](https://www.github.com/hasansezertasan)
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"""CLI argument parsing."""
|
|
2
|
+
|
|
3
|
+
from __future__ import annotations
|
|
4
|
+
|
|
5
|
+
from typing import TYPE_CHECKING
|
|
6
|
+
|
|
7
|
+
from hwid.cli.app import build_parser
|
|
8
|
+
|
|
9
|
+
if TYPE_CHECKING:
|
|
10
|
+
import argparse
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def parse_args(argv: list[str]) -> argparse.Namespace:
|
|
14
|
+
"""Parse CLI arguments without executing a command.
|
|
15
|
+
|
|
16
|
+
Args:
|
|
17
|
+
argv: Argument vector to parse.
|
|
18
|
+
|
|
19
|
+
Returns:
|
|
20
|
+
argparse.Namespace: The parsed arguments.
|
|
21
|
+
"""
|
|
22
|
+
return build_parser().parse_args(argv)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"""Look up the version of the installed distribution."""
|
|
2
|
+
|
|
3
|
+
from importlib.metadata import version
|
|
4
|
+
|
|
5
|
+
from hwid.__metadata__ import PROJECT_NAME
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def version_lookup() -> str:
|
|
9
|
+
"""Return the installed distribution version for this project.
|
|
10
|
+
|
|
11
|
+
Returns:
|
|
12
|
+
str: The installed distribution version.
|
|
13
|
+
"""
|
|
14
|
+
return version(PROJECT_NAME)
|