WinRegal
Install
pip install winregal
Usage
Use winregal.RegKey along with the ‘with’ statement to access any key of your choice. winregal handles key opening and closing for you and makes iteration really simple.
Get a Key hierarchy with all values as a dictionary
Example : Print Putty sessions
In[2]: from winregal import RegKey
In[3]: with RegKey("HKEY_CURRENT_USER\SOFTWARE\SimonTatham\PuTTY\Sessions") as key:
... print(key.to_dict())
...
{'Server1: {'UserName': u'user', 'HostName': u'192.168.48.131', ... },
'Server2': {'UserName': u'user', 'HostName': u'192.168.48.132', ... }}
Iterate over Key hierarchy handling only values
Example : Print most recently run commands(RunMru)
In[1]: with RegKey("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\RunMRU") as key:
... for item in key:
... if isinstance(item, RegValue):
... print(item.name, item.data)
...
('a', u'cmd\\1')
('b', u'winword\\1')
('c', u'notepad\\1')
('d', u'control\\1')
('e', u'regedit\\1')
('f', u'calc\\1')
('j', u'notepad++\\1')
Directly access a value / key
In[10]: with RegKey(“HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerRunMRU”) as key: … print(key[‘a’].data) … cmd1
Next in module Development
Support ConnectRegistry (via RegKey.__init__)
Wrap Edit/Save/Delete operations: e.g. CreateKey, DeleteKey, DeleteValue, SetValue, SaveKey
Contact me (py@bitweis.com) if you need these anytime soon.
Metadata
Release files for winregal 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| winregal-1.0.1.tar.gz | 5.7 kB | Without provenance | Details for winregal-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| winregal-1.0.1-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details for winregal-1.0.1-py2.py3-none-any.whl |
Total release size: 13.3 kB
Release files / winregal-1.0.1.tar.gz
| Download URL | winregal-1.0.1.tar.gz |
|---|---|
| Size | 5.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
15f6c953fca69b9df186ae736c0acb8b6b56b99cd84571f8a60c2b784d74968d
|
|
BLAKE2b-256 checksum How to use checksums |
bfc49e869bcdcceea231001cbaefc71a0d6e2d4c00c858ad99bba73121021eff
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / winregal-1.0.1-py2.py3-none-any.whl
| Download URL | winregal-1.0.1-py2.py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
6f29127fbdb4184a8fa8ba7711b661a7d965bb0ec4691d1cebaa82dec42ef2eb
|
|
BLAKE2b-256 checksum How to use checksums |
4cd7dec3a6aaf8678b30a56563f9449b9e0e3cfa5830ce0ca40c30cfe9bce66a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for winregal 1.0.1
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.