{"id":21831,"library":"python-registry","title":"python-registry","description":"python-registry is a pure Python library for reading Windows Registry files (Windows NT, 2000, XP, Vista, 7, 8, 10, etc.). It supports both user and system hives, including registry transaction logs. Current version 1.3.1 is stable; releases are infrequent.","status":"active","version":"1.3.1","language":"python","source_language":"en","source_url":"https://github.com/williballenthin/python-registry","tags":["windows","registry","forensics","parser"],"install":[{"cmd":"pip install python-registry","lang":"bash","label":"pip"}],"dependencies":[{"reason":"Python 2/3 compatibility; required by the library.","package":"six","optional":false}],"imports":[{"wrong":"from registry import Registry","symbol":"Registry","correct":"from Registry import Registry"}],"quickstart":{"code":"from registry import Registry\nimport os\n\nhive_path = os.environ.get('HIVE_PATH', '/path/to/SAM')\nreg = Registry(hive_path)\n# Iterate over root keys\nfor key in reg.root().subkeys():\n    print(key.name())","lang":"python","description":"Open a registry hive file and list its subkeys."},"warnings":[{"fix":"Ensure you point to a valid hive file path, not a registry key path like 'HKLM\\SAM'.","message":"The library only reads offline hive files (files on disk). It does not interact with the Windows Registry API on a live system. You must have access to the hive file (e.g., from a disk image or backup).","severity":"gotcha","affected_versions":"all"},{"fix":"Use RegistryKey.value().name (now str) and RegistryKey.value().raw_data() for the original bytes.","message":"In version 1.3.0, the RegistryKey.value() method now returns the value name as str (bytes in earlier versions). This can break code that expects bytes for binary values.","severity":"breaking","affected_versions":">=1.3.0"},{"fix":"Call find_key on the root key object: reg.root().find_key('SubKey')","message":"The Registry.find_key() method is deprecated since 1.3.0. Use RegistryKey.find_key() or recursive iteration instead.","severity":"deprecated","affected_versions":">=1.3.0"}],"env_vars":null,"search_vec":"'1.3.1':39 '10':24 '2000':19 '7':22 '8':23 'current':37 'etc':25 'file':16 'forens':47 'hive':32 'includ':33 'infrequ':44 'librari':11 'log':36 'nt':18 'parser':48 'pure':9 'python':2,5,10 'python-registri':1,4 'read':13 'registri':3,6,15,34,46 'releas':42 'stabl':41 'support':27 'system':31 'transact':35 'user':29 'version':38 'vista':21 'window':14,17,45 'xp':20","created_at":"2026-04-27T17:01:58.722486+00:00","updated_at":"2026-04-27T17:01:58.722486+00:00","problems":null,"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.3.1","cli_name":"","cli_version":null,"type":"library","homepage":"http://www.williballenthin.com/registry/","github":null,"docs":null,"changelog":null,"pypi":"https://pypi.org/project/python-registry/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-08-02","install_tag":null}}