Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
A.Shpak committed Nov 12, 2024
1 parent 1bd28b9 commit b91092a
Show file tree
Hide file tree
Showing 12 changed files with 273 additions and 488 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ jobs:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
- "3.14"
steps:
-
name: Set up Python ${{ matrix.python-version }}
Expand Down
15 changes: 7 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,17 @@ pip install winregistry
## Usage

```py
from winregistry import WinRegistry
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")
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
Expand Down
171 changes: 4 additions & 167 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ python = ">=3.9"
mypy = "^1.13"
pytest = "^8.3"
black = "^24.10"
robotframework = "^7.1"
robotframework = ">=7.1"
isort = "^5.13"
ruff = "^0.7.3"

Expand Down
4 changes: 2 additions & 2 deletions tests/test_utils.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from winreg import HKEY_CURRENT_USER, KEY_READ

from winregistry import WinRegistry
from winregistry._utils import get_access_key, parse_key_name
from _winregistry import WinRegistry
from _winregistry._utils import get_access_key, parse_key_name

TEST_REG_PATH = r"HKCU\SOFTWARE\_REMOVE_ME_"

Expand Down
Loading

0 comments on commit b91092a

Please sign in to comment.