{ "info": { "author": "Robert Nowotny", "author_email": "rnowotny1966@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "lib_registry\r\n============\r\n\r\n|Build Status| |Pypi Status| |Codecov Status| |Better Code| |snyk security|\r\n\r\nsome convenience functions to access the windows registry - to be extended.\r\n\r\nsupports python 2.7 - python 3.7 and possibly other dialects.\r\n\r\n`100% code coverage `_, tested under `Windows and Wine `_\r\n\r\n-----\r\n\r\n\r\n`Report Issues `_\r\n\r\n`Contribute `_\r\n\r\n`Pull Request `_\r\n\r\n`Code of Conduct `_\r\n\r\n\r\n-----\r\n\r\n\r\nInstallation and Upgrade\r\n------------------------\r\n\r\nFrom source code:\r\n\r\n.. code-block:: bash\r\n\r\n # normal install\r\n python setup.py install\r\n # test without installing\r\n python setup.py test\r\n\r\nvia pip latest Release:\r\n\r\n.. code-block:: bash\r\n\r\n # latest Release from pypi\r\n pip install lib_registry\r\n\r\nvia pip latest Development Version:\r\n\r\n.. code-block:: bash\r\n\r\n # upgrade all dependencies regardless of version number (PREFERRED)\r\n pip install --upgrade https://github.com/bitranox/lib_registry/archive/master.zip --upgrade-strategy eager\r\n # normal install\r\n pip install --upgrade https://github.com/bitranox/lib_registry/archive/master.zip\r\n # test without installing\r\n pip install --upgrade https://github.com/bitranox/lib_registry/archive/master.zip --install-option test\r\n\r\nvia requirements.txt:\r\n\r\n.. code-block:: bash\r\n\r\n # Insert following line in Your requirements.txt:\r\n # for the latest Release:\r\n lib_registry\r\n # for the latest Development Version :\r\n https://github.com/bitranox/lib_registry/archive/master.zip\r\n\r\n # to install and upgrade all modules mentioned in requirements.txt:\r\n pip install --upgrade -r //requirements.txt\r\n\r\nvia python:\r\n\r\n.. code-block:: bash\r\n\r\n python -m pip install --upgrade lib_registry\r\n\r\n\r\nBasic Usage\r\n-----------\r\n\r\n.. code-block:: py\r\n\r\n >>> from lib_registry import *\r\n\r\n >>> # Read a Value from the Registry\r\n >>> key = 'HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\ProfileList\\\\S-1-5-20'\r\n >>> get_value(key_name=key, value_name='ProfileImagePath')\r\n '%systemroot%\\\\\\\\ServiceProfiles\\\\\\\\NetworkService'\r\n\r\n >>> # Create a Key\r\n >>> create_key(r'HKCU\\\\Software\\\\lib_registry_test')\r\n\r\n >>> # Delete a Key\r\n >>> delete_key(r'HKCU\\\\Software\\\\lib_registry_test')\r\n\r\n\r\n >>> # Write a Value to the Registry\r\n >>> create_key(r'HKCU\\\\Software\\\\lib_registry_test')\r\n >>> set_value(key_name=r'HKCU\\\\Software\\\\lib_registry_test', value_name='test_name', value='test_string', value_type=REG_SZ)\r\n >>> result = get_value(key_name=r'HKCU\\\\Software\\\\lib_registry_test', value_name='test_name')\r\n >>> assert result == 'test_string'\r\n\r\n >>> # Delete a Value from the Registry\r\n >>> delete_value(key_name=r'HKCU\\\\Software\\\\lib_registry_test', value_name='test_name')\r\n >>> delete_key(r'HKCU\\\\Software\\\\lib_registry_test')\r\n\r\n >>> # Check if a key exists\r\n >>> key_exist('HKEY_LOCAL_MACHINE\\\\SOFTWARE\\\\Microsoft\\\\Windows NT\\\\CurrentVersion\\\\ProfileList\\\\S-1-5-20'\r\n True\r\n >>> key_exist('HKEY_LOCAL_MACHINE\\\\Software\\\\DoesNotExist')\r\n False\r\n\r\n >>> # get the SID\u00b4s of all Windows users\r\n >>> get_ls_user_sids()\r\n ['.DEFAULT', 'S-1-5-18', 'S-1-5-19', 'S-1-5-20', ...]\r\n\r\n >>> # get the Username from SID\r\n >>> get_username_from_sid(sid='S-1-5-20')\r\n 'NetworkService'\r\n\r\n\r\nRequirements\r\n------------\r\n\r\npytest, see : https://github.com/pytest-dev/pytest\r\n\r\ntyping, see : https://pypi.org/project/typing/\r\n\r\nAcknowledgement\r\n---------------\r\n\r\nand special thanks to \"uncle bob\" Robert C. Martin, especially for his books on \"clean code\" and \"clean architecture\"\r\n\r\nContribute\r\n----------\r\n\r\nI would love for you to fork and send me pull request for this project.\r\nPlease contribute.\r\n\r\nLicense\r\n-------\r\n\r\nThis software is licensed under the `MIT license `_\r\n\r\nSee `License file `_\r\n\r\n.. |Build Status| image:: https://travis-ci.org/bitranox/lib_registry.svg?branch=master\r\n :target: https://travis-ci.org/bitranox/lib_registry\r\n.. for the pypi status link note the dashes, not the underscore !\r\n.. |Pypi Status| image:: https://badge.fury.io/py/lib-registry.svg\r\n :target: https://badge.fury.io/py/lib_registry\r\n.. |Codecov Status| image:: https://codecov.io/gh/bitranox/lib_registry/branch/master/graph/badge.svg\r\n :target: https://codecov.io/gh/bitranox/lib_registry\r\n.. |Better Code| image:: https://bettercodehub.com/edge/badge/bitranox/lib_registry?branch=master\r\n :target: https://bettercodehub.com/results/bitranox/lib_registry\r\n.. |snyk security| image:: https://snyk.io/test/github/bitranox/lib_registry/badge.svg\r\n :target: https://snyk.io/test/github/bitranox/lib_registry\r\n\r\nChangelog\r\n=========\r\n\r\n1.0.2\r\n-----\r\n\r\n2019-04-10: initial PyPi release\r\n\r\n1.0.1\r\n-----\r\n\r\n2019-03-29: prevent import error when importing under linux\r\n\r\n\r\n1.0.0\r\n-----\r\n\r\n2019-03-28: Initial public release\r\n\r\n\r\n", "description_content_type": "text/x-rst", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/bitranox/lib_registry", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "lib-registry", "package_url": "https://pypi.org/project/lib-registry/", "platform": "", "project_url": "https://pypi.org/project/lib-registry/", "project_urls": { "Homepage": "https://github.com/bitranox/lib_registry" }, "release_url": "https://pypi.org/project/lib-registry/1.0.2/", "requires_dist": [ "pytest", "typing" ], "requires_python": "", "summary": "Windows Registry related", "version": "1.0.2" }, "last_serial": 5124835, "releases": { "1.0.2": [ { "comment_text": "", "digests": { "md5": "e9607fe69835be0759a6ab88bb78d1a2", "sha256": "3b46637cd7d26050adde4c5108bd1ef86b67da3dc20959aaed809d937e3c4945" }, "downloads": -1, "filename": "lib_registry-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "e9607fe69835be0759a6ab88bb78d1a2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7134, "upload_time": "2019-04-10T16:07:24", "url": "https://files.pythonhosted.org/packages/8d/07/968ae409ece6327e3afea1e7288f900b4c13ed1fe95252c900282918f977/lib_registry-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae1b2172dab77d16f7ee20084fc53f98", "sha256": "eba780a876d69e7032ecd5dfad7d3ffbd79d9db642a6edaee6a1f635e8c3360b" }, "downloads": -1, "filename": "lib_registry-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ae1b2172dab77d16f7ee20084fc53f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6282, "upload_time": "2019-04-10T16:07:26", "url": "https://files.pythonhosted.org/packages/d8/b1/6a68d4fbfd5d95d338ba84e58205f748c57d5f46a38689fe475212c45987/lib_registry-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "e9607fe69835be0759a6ab88bb78d1a2", "sha256": "3b46637cd7d26050adde4c5108bd1ef86b67da3dc20959aaed809d937e3c4945" }, "downloads": -1, "filename": "lib_registry-1.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "e9607fe69835be0759a6ab88bb78d1a2", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7134, "upload_time": "2019-04-10T16:07:24", "url": "https://files.pythonhosted.org/packages/8d/07/968ae409ece6327e3afea1e7288f900b4c13ed1fe95252c900282918f977/lib_registry-1.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "ae1b2172dab77d16f7ee20084fc53f98", "sha256": "eba780a876d69e7032ecd5dfad7d3ffbd79d9db642a6edaee6a1f635e8c3360b" }, "downloads": -1, "filename": "lib_registry-1.0.2.tar.gz", "has_sig": false, "md5_digest": "ae1b2172dab77d16f7ee20084fc53f98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6282, "upload_time": "2019-04-10T16:07:26", "url": "https://files.pythonhosted.org/packages/d8/b1/6a68d4fbfd5d95d338ba84e58205f748c57d5f46a38689fe475212c45987/lib_registry-1.0.2.tar.gz" } ] }