Library aimed at working with Windows registry
Project description
winregistry
Minimalist Python library aimed at working with Windows Registry.
Installation
pip install winregistry
Usage
from winregistry import WinRegistry
TEST_REG_PATH = r"HKLM\SOFTWARE\_REMOVE_ME_"
if __name__ == "__main__":
with WinRegistry() as client:
client.create_key(TEST_REG_PATH)
client.write_entry(TEST_REG_PATH, "remove_me", "test")
test_entry = client.read_entry(TEST_REG_PATH, "remove_me")
assert test_entry.value == "test"
client.delete_entry(TEST_REG_PATH, "remove_me")
Usage with Robot Testing Framework
Library
*** Settings ***
Library winregistry.robot
*** Test Cases ***
Valid Login
${path} = Set Variable HKLM\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run
Write Registry Entry ${path} Notepad notepad.exe
${autorun} = Read Registry Key ${path}
Delete Registry Entry ${path} Notepad
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
winregistry-1.0.0.tar.gz
(4.8 kB
view hashes)
Built Distribution
Close
Hashes for winregistry-1.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b094a7d66fcae0bea1acf7abe7bce57569e100d8dbc8432c005fc0a8011d0a5 |
|
MD5 | a363346350f0ae5a889929d70228902d |
|
BLAKE2b-256 | ed9a63762bf902c3b8d8ccbd45622de60095805a5f9ac1258ba3de2d51e943ed |