Registry / data / python-registry

python-registry

JSON →
library1.3.1pypypi✓ verified 82d ago

python-registry is a pure Python library for reading Windows Registry files (Windows NT, 2000, XP, Vista, 7, 8, 10, etc.). It supports both user and system hives, including registry transaction logs. Current version 1.3.1 is stable; releases are infrequent.

pip install python-registry
INSTALL
IMPORT
SIG · PYTHON-REGISTRY
P
python-registry
datapythonv1.3.1
Install
2.6s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.3.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 19.5MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.6s · import 0.000s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Registry
from Registry import Registry
from registry import Registry

Open a registry hive file and list its subkeys.

from registry import Registry import os hive_path = os.environ.get('HIVE_PATH', '/path/to/SAM') reg = Registry(hive_path) # Iterate over root keys for key in reg.root().subkeys(): print(key.name())
Debug
Known issues
gotchaThe library only reads offline hive files (files on disk). It does not interact with the Windows Registry API on a live system. You must have access to the hive file (e.g., from a disk image or backup).
fix
Ensure you point to a valid hive file path, not a registry key path like 'HKLM\SAM'.
affects: all
breakingIn version 1.3.0, the RegistryKey.value() method now returns the value name as str (bytes in earlier versions). This can break code that expects bytes for binary values.
fix
Use RegistryKey.value().name (now str) and RegistryKey.value().raw_data() for the original bytes.
affects: >=1.3.0
deprecatedThe Registry.find_key() method is deprecated since 1.3.0. Use RegistryKey.find_key() or recursive iteration instead.
fix
Call find_key on the root key object: reg.root().find_key('SubKey')
affects: >=1.3.0
Upgrade
Version history
1.3.1latest on PyPI · released May 8, 2019
Audit
Dependencies
sixrequiredPython 2/3 compatibility; required by the library.
Agent activity
4 hits · last 30 days
node
4
Resources