{"id":34073546,"url":"https://github.com/dyer234/pywinsparkle","last_synced_at":"2025-12-14T08:58:10.037Z","repository":{"id":57458532,"uuid":"81893146","full_name":"dyer234/pywinsparkle","owner":"dyer234","description":null,"archived":false,"fork":false,"pushed_at":"2019-04-08T14:29:01.000Z","size":2086,"stargazers_count":9,"open_issues_count":1,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-08-26T07:14:04.237Z","etag":null,"topics":["pyinstaller","python","python-windows-updates","windows-updates","winsparkle","wrapper","wrapper-library"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dyer234.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-02-14T02:02:47.000Z","updated_at":"2022-09-08T07:38:09.000Z","dependencies_parsed_at":"2022-09-09T23:12:03.211Z","dependency_job_id":null,"html_url":"https://github.com/dyer234/pywinsparkle","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/dyer234/pywinsparkle","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyer234%2Fpywinsparkle","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyer234%2Fpywinsparkle/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyer234%2Fpywinsparkle/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyer234%2Fpywinsparkle/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dyer234","download_url":"https://codeload.github.com/dyer234/pywinsparkle/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dyer234%2Fpywinsparkle/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":27723956,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-12-14T02:00:11.348Z","response_time":56,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pyinstaller","python","python-windows-updates","windows-updates","winsparkle","wrapper","wrapper-library"],"created_at":"2025-12-14T08:58:09.298Z","updated_at":"2025-12-14T08:58:10.031Z","avatar_url":"https://github.com/dyer234.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"PyWinSparkle\n============\n\n\n### About pywinsparkle\n\nAn auto-update framework for frozen Python applications on Windows.\n\nPywinsparkle is a wrapper for the WinSparkle project originally developed by Vaclav Slavik. WinSparkle is an update framework for Windows. \n\nThe original WinSparkle project is located here: https://winsparkle.org/\n\ngithub: https://github.com/vslavik/winsparkle\n\nThe current version of PyWinSparkle includes WinSparkle 0.6.0\n\nNote: This is package is not affiliated with the original developer Vaclac Slavik and is therefore technically unofficial.\n\n### Installation\n\n\n`pip install pywinsparkle`\n\nWheels are built for 32bit and 64bit versions of Windows, covering Python 2.7 and all python version after 3.3\n\nNote: If you are using one of the above versions pip throws and errror, consider upgrading pip with `pip install --upgrade pip`\n\n\n### Usage\n\n\nAll of the API function wrapper names are the same as the original WinSparkle project. The only difference\nis in the argument types which are either python strings or integers. For the callback functions, just the function\nobject is required (ie, the name of the function without the parenthesis).\n\nIn pywinsparkle, I have not tested created Windows Resource files, instead I have just been using `win_sparkle_set_app_details()` function. The Windows Resource files should work though.\nIt is also necessary to set the appcast url with `win_sparkle_set_appcast_url()`.\n\nBasic Example:\n\n```python\nfrom pywinsparkle import pywinsparkle\nimport os\n\ndef no_update_found():\n    \"\"\" when no update has been found, close the updater\"\"\"\n    print(\"No update found\")\n    print(\"Setting flag to shutdown PassagesUpdater\")\n\n\ndef found_update():\n    \"\"\" log that an update was found \"\"\"\n    print(\"New Update Available\")\n\n\ndef encountered_error():\n    print(\"An error occurred\")\n\n\ndef update_cancelled():\n    \"\"\" when the update was cancelled, close the updater\"\"\"\n    print(\"Update was cancelled\")\n    print(\"Setting flag to shutdown PassagesUpdater\")\n\n\ndef shutdown():\n    \"\"\" The installer is being launched signal the updater to shutdown \"\"\"\n\n    # actually shutdown the app here\n    print(\"Safe to shutdown before installing\")\n\n\ndef main():\n\n    # register callbacks\n    pywinsparkle.win_sparkle_set_did_find_update_callback(found_update)\n    pywinsparkle.win_sparkle_set_error_callback(encountered_error)\n    pywinsparkle.win_sparkle_set_update_cancelled_callback(update_cancelled)\n    pywinsparkle.win_sparkle_set_did_not_find_update_callback(no_update_found)\n    pywinsparkle.win_sparkle_set_shutdown_request_callback(shutdown)\n\n    # set application details\n    update_url = \"https://winsparkle.org/example/appcast.xml\"\n    pywinsparkle.win_sparkle_set_appcast_url(update_url)\n    pywinsparkle.win_sparkle_set_app_details(\"VendorName\", \"TestApp1\", \"1.0.0\")\n\n    if os.path.isfile('dsa_pub.pem'):\n        with open('dsa_pub.pem', 'r') as file:\n            pub_key = file.read()\n        pywinsparkle.win_sparkle_set_dsa_pub_pem(pub_key)\n\n    # initialize\n    pywinsparkle.win_sparkle_init()\n\n    # check for updates\n    pywinsparkle.win_sparkle_check_update_with_ui()\n\n    # alternatively you could check for updates in the \n    # background silently\n    pywinsparkle.win_sparkle_check_update_without_ui()\n\n    # dont do it this way, just an example to keep the thread running\n    while True:\n        time.sleep(1)\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\n### API Documentation\n\nThe documentation for the API can be found at: \u003chttp://pythonhosted.org/pywinsparkle\u003e\n\n\n### Freezing with Pyinstaller\n\n\nAdd an entry to .SPEC in Analysis for binaries. \n\nAssuming you are using a virtual environment and it is called \"venv\" it would look like this:\n\n```python\n\nimport platform\n\nif architecture == \"64bit\":\n    winsparkle = 'venv\\\\Lib\\\\site-packages\\\\pywinsparkle\\\\libs\\\\x64\\\\WinSparkle.dll'\nelse:\n    winsparkle = 'venv\\\\Lib\\\\site-packages\\\\pywinsparkle\\\\libs\\\\x86\\\\WinSparkle.dll'\n\na = Analysis(['Updater\\\\src\\\\main.py'],\n             pathex=['.'],\n             binaries=[(winsparkle, '.')],\n             datas=[],\n             hiddenimports=[],\n             hookspath=[],\n             runtime_hooks=[],\n             excludes=[],\n             win_no_prefer_redirects=False,\n             win_private_assemblies=False,\n             cipher=block_cipher)\n```\n\nThe package contains DLL's for both 64bit and 32bit versions of python. Adding the \npreceding code snippet makes it possible to switch between versions of python \nseamlessly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyer234%2Fpywinsparkle","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdyer234%2Fpywinsparkle","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdyer234%2Fpywinsparkle/lists"}