Library aimed at working with Windows registry
Project description
Minimalist Python library aimed at working with Windows Registry.
Installation
pip install winregistry
Usage
>>> from winregistry import WinRegistry as Reg
>>> reg = Reg()
>>> path = r'HKLM\SOFTWARE\remove_me'
>>> reg.create_key(path + r'\test')
>>> True if 'remove_me' in reg.read_key(r'HKLM\SOFTWARE')['keys'] else False
True
>>> reg.write_value(path, 'Value name', b'21', 'REG_BINARY')
>>> reg.read_key(path)
{'keys': ['test'], 'values': [{'value': 'Value name', 'data': b'21...
>>> reg.read_value(path, 'Value name')
{'value': 'Value name', 'data': b'21', 'type': 'REG_BINARY'}
>>> reg.delete_value(path, 'Value name')
>>> reg.delete_key(path + r'\test')
>>> reg.read_key(path)
{'keys': [], 'values': [], 'modify': datetime.datetime(2017, 4, 16...
>>> reg.delete_key(path)
>>> True if 'remove_me' in reg.read_key(r'HKLM\SOFTWARE')['keys'] else False
False
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 Value ${path} Notepad notepad.exe
${autorun} = Read Registry Key ${path}
Delete Registry Value ${path} Notepad
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
winregistry-0.8.3.tar.gz
(3.5 kB
view details)
File details
Details for the file winregistry-0.8.3.tar.gz
.
File metadata
- Download URL: winregistry-0.8.3.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 |
6d647a54eca832417b2d6e9fb017e21a8d089bc69687130ae1405ef635357901
|
|
MD5 |
ca1baa0445257e80ce7556986cf95f63
|
|
BLAKE2b-256 |
7e1c855494e2dc7da9ec5c2b1461db3a32b6dcde85a82da90857c28c7a7f0d00
|