Skip to main content

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

Metadata

Release files for winregistry 0.8.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for winregistry 0.8.3
File Size Uploaded Provenance Actions
winregistry-0.8.3.tar.gz 3.5 kB Without provenance Details for winregistry-0.8.3.tar.gz

Release files / winregistry-0.8.3.tar.gz

Download URL winregistry-0.8.3.tar.gz
Size 3.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6d647a54eca832417b2d6e9fb017e21a8d089bc69687130ae1405ef635357901
BLAKE2b-256 checksum
How to use checksums
7e1c855494e2dc7da9ec5c2b1461db3a32b6dcde85a82da90857c28c7a7f0d00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for winregistry 0.8.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page