{"id":15018751,"url":"https://github.com/shpaker/winregistry","last_synced_at":"2026-02-15T11:09:33.024Z","repository":{"id":47609234,"uuid":"87100552","full_name":"shpaker/winregistry","owner":"shpaker","description":"Python package aimed at working with Windows Registry","archived":false,"fork":false,"pushed_at":"2025-03-31T12:34:39.000Z","size":304,"stargazers_count":21,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-09T21:19:20.058Z","etag":null,"topics":["python","regedit","registry","robotframework","testing","windows","winreg"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shpaker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"shpaker"}},"created_at":"2017-04-03T17:17:54.000Z","updated_at":"2025-03-31T12:33:52.000Z","dependencies_parsed_at":"2024-06-19T00:11:26.873Z","dependency_job_id":"4acc5df9-c87c-4ee7-b7ea-d697d753d72d","html_url":"https://github.com/shpaker/winregistry","commit_stats":{"total_commits":36,"total_committers":5,"mean_commits":7.2,"dds":"0.36111111111111116","last_synced_commit":"1e83beb9f82ea6a87293a3b2d6ef0d5841b9364d"},"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shpaker%2Fwinregistry","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shpaker%2Fwinregistry/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shpaker%2Fwinregistry/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shpaker%2Fwinregistry/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shpaker","download_url":"https://codeload.github.com/shpaker/winregistry/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248111973,"owners_count":21049578,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","regedit","registry","robotframework","testing","windows","winreg"],"created_at":"2024-09-24T19:52:24.551Z","updated_at":"2026-02-15T11:09:33.013Z","avatar_url":"https://github.com/shpaker.png","language":"Python","funding_links":["https://github.com/sponsors/shpaker"],"categories":[],"sub_categories":[],"readme":"# WinRegistry\n\n[![PyPI](https://img.shields.io/pypi/v/winregistry.svg)](https://pypi.python.org/pypi/winregistry)\n[![PyPI](https://img.shields.io/pypi/dm/winregistry.svg)](https://pypi.python.org/pypi/winregistry)\n\nA Python library for interacting with the Windows registry.\n\n**Windows only.** This library depends on the standard library module `winreg`, which is available only on Windows. On Linux or macOS you will get `ModuleNotFoundError: No module named 'winreg'`; use Windows or guard usage with a platform check (e.g. `if sys.platform == \"win32\"`). This library provides a simple and intuitive API for performing common registry operations, making it easier to work with the Windows registry in Python applications and automated tests.\n\n## Installation\n\nInstall via PyPI:\n\n```bash\npip install winregistry\n```\n\n## Usage\n\n### Creating and Deleting Registry Keys\n\n```python\nimport winreg\nfrom winregistry import open_key\n\n# Create a registry key\nwith open_key(\n  \"HKLM\\\\SOFTWARE\\\\MyApp\",\n  sub_key_ensure=True,\n  sub_key_access=winreg.KEY_WRITE,\n) as key:\n  print(\"Registry key created\")\n\n# Delete a registry key\nwith open_key(\n  \"HKLM\\\\SOFTWARE\",\n  sub_key_access=winreg.KEY_WRITE,\n) as key:\n  key.delete_key(\"MyApp\")\n  print(\"Registry key deleted\")\n```\n\n### Setting and Reading Registry Values\n\n```python\nimport winreg\nfrom winregistry import open_key, open_value\n\n# Set a registry value\nwith open_key(\n  \"HKLM\\\\SOFTWARE\\\\MyApp\",\n  sub_key_ensure=True,\n  sub_key_access=winreg.KEY_WRITE,\n) as key:\n  key.set_value(\n    \"MyValue\",\n    winreg.REG_SZ,\n    \"Sample Data\",\n  )\n  print(\"Registry value set\")\n\n# Read a registry value\nwith open_value(\n  \"HKLM\\\\SOFTWARE\\\\MyApp\",\n  value_name=\"MyValue\",\n) as value:\n  print(f\"Registry value: {value.data}\")\n```\n\n### Enumerating Subkeys and Values\n\n```python\nimport winreg\nfrom winregistry import open_key\n\n# Enumerate subkeys\nwith open_key(\n  \"HKLM\\\\SOFTWARE\",\n  sub_key_access=winreg.KEY_READ,\n) as key:\n  subkeys = list(key.child_keys_names)\n  print(f\"Subkeys: {subkeys}\")\n\n# Enumerate values\nwith open_key(\n  \"HKLM\\\\SOFTWARE\\\\MyApp\",\n  sub_key_access=winreg.KEY_READ,\n) as key:\n  values = [(v.name, v.data) for v in key.values]\n  print(f\"Values: {values}\")\n```\n\n## Usage with [Robot Testing Framework](https://robotframework.org/)\n\nThe library provides a Robot Framework library that makes it easy to work with the Windows registry in automated tests. The library is available as `winregistry.robot`.\n\n### Documentation\n\nFor detailed documentation of the Robot Framework library, visit:\n\nhttps://shpaker.github.io/winregistry/winregistry.robot.html\n\n### Example Tests\n\nA complete set of example tests demonstrating various registry operations can be found in the [winregistry_tests.robot](winregistry_tests.robot) file. These tests cover:\n\n- Creating and deleting registry keys\n- Working with nested registry keys\n- Setting and reading registry values\n- Verifying registry key and value existence\n- Enumerating subkeys and values\n\n## Contributing\n\nContributions are welcome!\n\nCommit messages follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification.\n\n### Setting Up the Development Environment\n\nWe use `uv` for dependency management and packaging. To set up your development environment, follow these steps:\n\n1. Install `uv` if you haven't already:\n\n    ```bash\n    pip install uv\n    ```\n\n2. Install the project dependencies:\n\n    ```bash\n    uv sync --group dev\n    ```\n\n### Code Formatting and Linting\n\nWe use `ruff` for code formatting and linting. The following tasks are defined in the `Justfile` to help with these processes:\n\n- **Format the code:**\n\n    ```bash\n    just fmt\n    ```\n\n- **Run the linter:**\n\n    ```bash\n    just lint\n    ```\n\n## License\n\nThis project is licensed under the MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshpaker%2Fwinregistry","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshpaker%2Fwinregistry","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshpaker%2Fwinregistry/lists"}