{"id":13446552,"url":"https://github.com/mhammond/pywin32","last_synced_at":"2025-09-09T20:40:12.539Z","repository":{"id":37470899,"uuid":"108187130","full_name":"mhammond/pywin32","owner":"mhammond","description":"Python for Windows (pywin32) Extensions","archived":false,"fork":false,"pushed_at":"2025-08-27T14:47:42.000Z","size":51762,"stargazers_count":5416,"open_issues_count":407,"forks_count":839,"subscribers_count":145,"default_branch":"main","last_synced_at":"2025-09-08T13:29:24.435Z","etag":null,"topics":["python","windows"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mhammond.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGES.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2017-10-24T21:44:27.000Z","updated_at":"2025-09-08T08:26:24.000Z","dependencies_parsed_at":"2023-09-21T17:35:39.589Z","dependency_job_id":"1ad8d18f-64a4-4373-b0a7-7ef77ad6ce80","html_url":"https://github.com/mhammond/pywin32","commit_stats":{"total_commits":4717,"total_committers":97,"mean_commits":"48.628865979381445","dds":0.2507949968200127,"last_synced_commit":"a83b36c3a2f7a5c66c32dcb1ed03ff80c8509208"},"previous_names":[],"tags_count":74,"template":false,"template_full_name":null,"purl":"pkg:github/mhammond/pywin32","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhammond%2Fpywin32","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhammond%2Fpywin32/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhammond%2Fpywin32/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhammond%2Fpywin32/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mhammond","download_url":"https://codeload.github.com/mhammond/pywin32/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mhammond%2Fpywin32/sbom","scorecard":{"id":639778,"data":{"date":"2025-08-11","repo":{"name":"github.com/mhammond/pywin32","commit":"1baced97cc5f2828d00bae8c70ec5e1833b66999"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":5.2,"checks":[{"name":"Code-Review","score":9,"reason":"Found 28/30 approved changesets -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/docs.yml:1","Warn: no topLevel permission defined: .github/workflows/main.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":10,"reason":"23 commit(s) and 5 issue activity found in the last 90 days -- score normalized to 10","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: AutoDuck/bin/autoduck.exe:1","Warn: binary detected: SWIG/swig.exe:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:24: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:43: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/docs.yml:57: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/docs.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/docs.yml:62: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/docs.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:153: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:154: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:164: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:189: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:190: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:201: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:70: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:87: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:107: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:110: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:128: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/main.yml:139: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/main.yml:144: update your workflow using https://app.stepsecurity.io/secureworkflow/mhammond/pywin32/main.yml/main?enable=pin","Info:   0 out of  15 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   5 third-party GitHubAction dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":-1,"reason":"internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration","details":null,"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 28 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T10:22:09.360Z","repository_id":37470899,"created_at":"2025-08-21T10:22:09.360Z","updated_at":"2025-08-21T10:22:09.360Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":274210372,"owners_count":25241789,"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-09-08T02:00:09.813Z","response_time":121,"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":["python","windows"],"created_at":"2024-07-31T05:00:54.347Z","updated_at":"2025-09-09T20:40:12.530Z","avatar_url":"https://github.com/mhammond.png","language":"C++","funding_links":[],"categories":["C++","Microsoft Windows","微软的 Windows 平台","Microsoft Windows [🔝](#readme)","\u003ca id=\"1d9dec1320a5d774dc8e0e7604edfcd3\"\u003e\u003c/a\u003e工具-新添加的"],"sub_categories":["\u003ca id=\"8f1b9c5c2737493524809684b934d49a\"\u003e\u003c/a\u003e文章\u0026\u0026视频"],"readme":"# pywin32\n\n[![CI](https://github.com/mhammond/pywin32/workflows/CI/badge.svg)](https://github.com/mhammond/pywin32/actions?query=workflow%3ACI)\n[![PyPI - Version](https://img.shields.io/pypi/v/pywin32.svg)](https://pypi.org/project/pywin32)\n[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pywin32.svg)](https://pypi.org/project/pywin32)\n[![PyPI - Downloads](https://img.shields.io/pypi/dm/pywin32.svg)](https://pypi.org/project/pywin32)\n[![License - PSF-2.0](https://img.shields.io/badge/license-PSF--2.0-9400d3.svg)](https://spdx.org/licenses/PSF-2.0.html)\n\n-----\n\nThis is the readme for the Python for Win32 (pywin32) extensions, which provides access to many of the Windows APIs from Python, including COM support.\n\nSee [CHANGES.md](https://github.com/mhammond/pywin32/blob/main/CHANGES.md) for recent notable changes.\n\nadodbapi's documentation can be found in: [adodbapi/readme.txt](https://github.com/mhammond/pywin32/blob/main/adodbapi/readme.txt)\n\nisapi's documentation can be found in: [isapi/README.txt](https://github.com/mhammond/pywin32/blob/main/isapi/README.txt)\n\n## Docs\n\nThe docs are a long and sad story, but [there's now an online version](https://mhammond.github.io/pywin32/)\nof the `PyWin32.chm` helpfile (thanks [@ofek](https://github.com/mhammond/pywin32/pull/1774)!).\nLots of that is very old, but some is auto-generated and current. Would love help untangling the docs!\n\nYou can get type hints, signatures and annotations from [`types-pywin32`](https://pypi.org/project/types-pywin32/).\n\n## Support\n\nFeel free to [open issues](https://github.com/mhammond/pywin32/issues) for\nall bugs (or suspected bugs) in pywin32. [pull-requests](https://github.com/mhammond/pywin32/pulls)\nfor all bugs or features are also welcome.\n\nHowever, please **do not open GitHub issues for general support requests**, or for problems or questions using the modules in this package.  \nFor pywin32 support requests, please start a [discussion](https://github.com/mhammond/pywin32/discussions) under the [Q\u0026A category](https://github.com/mhammond/pywin32/discussions/new?category=q-a). All non bug related issues will be converted into a discussion anyhow.  \nThe [python-win32 mailing list](https://mail.python.org/mailman/listinfo/python-win32) is still available for general Python on Windows help requests.\n\nType stubs currently live in [typeshed](\u003chttps://github.com/python/typeshed/tree/main/stubs/pywin32\u003e).\nAny issue or request related to static type-checking and IntelliSense should be raised there.\n\n## Binaries\n\n[Binary releases are no longer supported.](https://mhammond.github.io/pywin32_installers.html)\n\nBuild 306 was the last with .exe installers. You really shouldn't use them, but if you really need them,\n[find them here](https://github.com/mhammond/pywin32/releases/tag/b306)\n\n## Installing via PIP\n\nYou should install pywin32 via pip - eg,\n\n```shell\npython -m pip install --upgrade pywin32\n```\n\nThere is a post-install script (see below) which should *not* be run inside virtual environments;\nit should only be run in \"global\" installs.\n\nFor unreleased changes, you can download builds made by [GitHub actions](https://github.com/mhammond/pywin32/actions/) -\nchoose any \"workflow\" from the `main` branch and download its \"artifacts\"\n\n### Installing globally\n\nOutside of a virtual environment you might want to install COM objects, services, etc. You can do\nthis by executing:\n\n```shell\npython -m pywin32_postinstall -install\n```\n\nor (shorter but you don't have control over which python environment is used)\n\n```shell\npywin32_postinstall -install\n```\n\nIf you do this with normal permissions it will be global for your user (a few files will be\ncopied to the root of your Python install and some changes made to HKCU). If you execute this from\nan elevated process, it will be global for the machine (files will be copied to System32, HKLM\nwill be changed, etc)\n\n### Installing for MingGW/msys2\n\nThe folks at \u003chttps://github.com/msys2/MINGW-packages/tree/master/mingw-w64-python-pywin32\u003e are graciously keeping an updated set of patches to install pywin32 for MingGW/msys2.\n\nWe'd suggest installing from \u003chttps://packages.msys2.org/base/mingw-w64-python-pywin32\u003e `pacman -S mingw-w64-python-pywin32`.\n\nWe're open to seeing these patches be upstreamed in pywin32 if they can be tested automatically on the CI.\n\n### Running as a Windows Service\n\nTo run as a service, you probably want to install pywin32 globally from an elevated\ncommand prompt - see above.\n\nYou also need to ensure Python is installed in a location where the user running\nthe service has access to the installation and is able to load `pywintypesXX.dll` and `pythonXX.dll`.\nIn particular, the `LocalSystem` account typically will not have access to your local `%USER%` directory structure.\n\n## Troubleshooting\n\nIf you encounter any problems when upgrading like the following:\n\n```text\nThe specified procedure could not be found\nEntry-point not found\n```\n\nIt usually means one of 2 things:\n\n* You've upgraded an install where the post-install script was previously run.\nSo you should run it again:\n\n    ```shell\n    python -m pywin32_postinstall -install\n    ```\n\n    or (shorter but you don't have control over which python environment is used)\n\n    ```shell\n    pywin32_postinstall -install\n    ```\n\n    This will make some small attempts to cleanup older conflicting installs.\n\n* There are other pywin32 DLLs installed in your system,\nbut in a different location than the new ones. This sometimes happens in environments that\ncome with pywin32 pre-shipped (eg, anaconda?).\n\n  The possible solutions here are:\n\n  * Run the \"post_install\" script documented above.\n  * Otherwise, find and remove all other copies of `pywintypesXX.dll` and `pythoncomXX.dll`\n  (where `XX` is the Python version - eg, \"39\")\n\n## Building from source\n\nInstall Visual Studio 2019 (later probably works, but options might be different),\nfollow the instructions in [Build environment](/build_env.md#build-environment)\nfor the version you install.\n\nThen follow the [Build](/build_env.md#build) instructions for the build itself (including ARM64 cross-compilation).\n\n## Release process\n\nThe following steps are performed when making a new release - this is mainly\nto form a checklist so @mhammond doesn't forget what to do :)\n\nSince build 307 the release process is based on the artifacts created by Github actions.\n\n* Ensure CHANGES.md has everything worth noting. Update the header to reflect\n  the about-to-be released build and date, commit it.\n\n* Update setup.py with the new build number. Update CHANGES.md to have a new heading\n  section for the next unreleased version. (ie, a new, empty \"Coming in build XXX, as yet unreleased\"\n  section)\n\n* Push these changes to GitHub, wait for the actions to complete, then\n  download the artifacts from that run.\n\n* Upload `.whl` artifacts to pypi - we do this before pushing the tag because they might be\n  rejected for an invalid `README.md`. Done via `py -3.? -m twine upload dist/*XXX*.whl`.\n\n* Create a new git tag for the release.\n\n* Update setup.py with the new build number + \".1\" (eg, 123.1), to ensure\n  future test builds aren't mistaken for the real release.\n\n* Make sure everything is pushed to GitHub, including the tag (ie,\n  `git push --tags`)\n\n* Send mail to python-win32\n\n### Older Manual Release Process\n\nThis is the old process used when a local dev environment was used to create\nthe builds. Build 306 was the last released with this process.\n\n* Ensure CHANGES.md has everything worth noting. Update the header to reflect\n  the about-to-be released build and date, commit it.\n\n* Update setup.py with the new build number.\n\n* Execute `make_all.bat`, wait forever, test the artifacts.\n\n* Upload .whl artifacts to pypi - we do this before pushing the tag because they might be\n  rejected for an invalid `README.md`. Done via `py -3.? -m twine upload dist/*XXX*.whl`.\n\n* Commit setup.py (so the new build number is in the repo), create a new git tag\n\n* Upload the .exe installers to GitHub.\n\n* Update setup.py with the new build number + \".1\" (eg, 123.1), to ensure\n  future test builds aren't mistaken for the real release.\n\n* Make sure everything is pushed to GitHub, including the tag (ie,\n  `git push --tags`)\n\n* Send mail to python-win32\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhammond%2Fpywin32","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmhammond%2Fpywin32","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmhammond%2Fpywin32/lists"}