Windows Registry Editor with Pythonic interface
Project description
windowsregistry
windowsregistry is a Python library for interacting with the Windows Registry. It provides a high-level interface to manage registry keys and values, abstracting away from the standard library winreg
Installation
To install the windowsregistry library, you can use pip:
pip install windowsregistry
Usage
Below is a basic example of how to use the windowsregistry library to interact with the Windows Registry.
from windowsregistry import HKCU
from windowsregistry.models import RegistryValueType
# Open a registry key
reg_key = HKCU.open_subkey("Software\\MyApp")
# Check if a subkey exists
if reg_key.subkey_exists("Settings"):
...
# Create a new subkey
new_key = reg_key.create_subkey("NewSettings")
new_key.set_value("MyValue", 1234, dtype=RegistryValueType.REG_DWORD) # Set a value in the registry
my_value = new_key.get_value("MyValue") # Query a value from the registry
print(f"Value: {my_value.data}")
new_key.delete_value("MyValue") # Delete a registry value
reg_key.delete_subkey("NewSettings", recursive=True) # Delete a registry subkey
License
This project is licensed under the MIT License.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
windowsregistry-0.1.3.tar.gz
(8.4 kB
view details)
Built Distribution
File details
Details for the file windowsregistry-0.1.3.tar.gz
.
File metadata
- Download URL: windowsregistry-0.1.3.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c5f5e233cdbc7cf136203681f36ac8bd40ff69a50d4a59c9440cc4f0cfa3061c |
|
MD5 | 093d832f26088dbd2740acf9112a53a3 |
|
BLAKE2b-256 | e630951c854cf326255558f95b46460226b70fd9c4ea44714d4f3596b498e9ff |
File details
Details for the file windowsregistry-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: windowsregistry-0.1.3-py3-none-any.whl
- Upload date:
- Size: 18.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.2 CPython/3.11.8 Windows/10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 482df4fd41467fe8fb94323e1114c13d9e1e174869dee06a5dd27358fc8f1843 |
|
MD5 | c86d9b0899f89f5e2bf6ee79b5c97683 |
|
BLAKE2b-256 | 226f1241434c74907037c65f117679fef3c95975250946a7492ca232d9db0d68 |