MFD Win Registry
Module for managing Windows registry keys and values.
Usage
from mfd_connect import RPyCConnection
from mfd_win_registry import WindowsRegistry, PropertyType
conn = RPyCConnection(ip="10.10.10.10")
winreg_obj = WindowsRegistry(connection=conn)
winreg_obj.get_registry_path(
path="hklm:\\system\\CurrentControlSet\\control\\class\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\0005"
)
winreg_obj.add_registry_key("SLOT 2 Port 1", "FecMode", "1")
winreg_obj.remove_registry_key("SLOT 2 Port 1", "FecMode")
winreg_obj.check_registry_key("SLOT 2 Port 1", "FecMode", "0")
winreg_obj.registry_exists(
path="hklm:\\system\\CurrentControlSet\\control\\class\\{4D36E972-E325-11CE-BFC1-08002BE10318}"
)
winreg_obj.set_feature('SLOT 4 Port 2', "FecMode", "1")
winreg_obj.set_feature('SLOT 4 Port 2', "Version", "42", PropertyType.DWORD)
winreg_obj.remove_feature("SLOT 4 Port 2", "Version")
winreg_obj.get_feature_possible_values("SLOT 4 Port 2", "FecMode")
winreg_obj.get_registry_childitems(path="hklm:\\system\\CurrentControlSet\\control\\class\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\0005")
winreg_obj.check_proset_registry()
winreg_obj.remove_registry_subkeys(
path="hklm:\\system\\CurrentControlSet\\control\\class\\{4D36E972-E325-11CE-BFC1-08002BE10318}\\0005\\Ndi\\icea"
)
winreg_obj.get_rx_buffers("SLOT 4 Port 2")
winreg_obj.get_rx_buffers("SLOT 4 Port 2", BuffersAttribute.MIN)
winreg_obj.get_tx_buffers("SLOT 4 Port 2")
winreg_obj.get_tx_buffers("SLOT 4 Port 2", BuffersAttribute.MAX)
winreg_obj.get_feature_enum("SLOT 4 Port 2", "\*SpeedDuplex")
winreg_obj.get_feature_list("SLOT 4 Port 2")
winreg_obj.get_feature_list("SLOT 4 Port 2", False)
Implemented methods
-
Responsible for getting the all the contents in dictionary format for the path given by the user.
get_registry_path(self, path: str, depth: int = 0) -> Dict
-
Responsible for getting the features for the given interface.
get_feature_list(self, interface: str, cached: bool = True) -> Dict
-
Responsible for testing the given path exists or not.
registry_exists(self, path: str) -> bool
-
Responsible for adding the register value for a given interface and feature.
add_registry_key(self, interface: str, feature: str, value: str) -> None
-
Responsible for removing the register value for a given interface and feature.
remove_registry_key(self, interface: str, feature: str) -> None
-
Responsible for checking whether the given register value is set on the feature or not.
check_registry_key(self, interface: str, feature: str, value: str) -> None
-
Responsible for setting feature in registry based on user path or base path.
set_feature( self, interface: str, feature: str, value: str, prop_type: PropertyType = PropertyType.NONE, base_path: str = None, new_prop_create: bool = True, ) -> None
-
Responsible for removing feature entry from registry.
remove_feature(self, interface: str, feature: str, base_path: str = None) -> None
-
Responsible for getting all the feature supported values.
get_feature_possible_values(self, interface: str, feature: str) -> List[int]
-
Responsible for getting all the child items from the path.
get_registry_childitems(self, path: str, depth: int = 0) -> Dict[str, Dict[str, str]]
-
Responsible for checking if PROSET entries exist in registry.
check_proset_registry(self) -> bool
-
Responsible for removing all registry sub-keys from given path.
remove_registry_subkeys(self, path: str) -> None
-
Responsible for getting RX buffers value on the given interface.
get_rx_buffers(self, interface: str, attr: BuffersAttribute = BuffersAttribute.NONE) -> int
-
Responsible for getting TX buffers value on the given interface.
get_tx_buffers(self, interface: str, attr: BuffersAttribute = BuffersAttribute.NONE) -> int
-
Responsible for getting enum key values for the given feature.
get_feature_enum(self, interface: str, feature: str) -> Union[Dict[str, str]]
-
Set itemproperty for the feature.
set_itemproperty(self, path: str, name: str, value: str) -> None
OS supported:
- WINDOWS
Issue reporting
If you encounter any bugs or have suggestions for improvements, you're welcome to contribute directly or open an issue here.
Metadata
Release files for mfd-win-registry 1.17.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mfd_win_registry-1.17.0-py3-none-any.whl | Python 3 | none | any | Details for mfd_win_registry-1.17.0-py3-none-any.whl |
Release files / mfd_win_registry-1.17.0-py3-none-any.whl
| Download URL | mfd_win_registry-1.17.0-py3-none-any.whl |
|---|---|
| Size | 10.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fdf51425dccb9cc005fececae65f78f65c5118903938582ae79f55d2e262541
|
|
BLAKE2b-256 checksum How to use checksums |
c47a7845aa5755b5b6f4f5a2f48119fb952b1cba87825e2c1233c1609152b64a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
Security for mfd-win-registry 1.17.0
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.