PYPI PACKAGE AUDIT v1.9.7 企业级健康

python-discovery

Python解释器发现

PyPkgScore python-discovery
评估方法与标准 ♥ Donate
920 / 1000
快速安装
pip install python-discovery
1. 治理
200/200
2. PEP 元数据
200/200
3. 安全性
200/200
4. 文档与 SEO
155/200
5. CI 工程
165/200
📣 分享审计报告: 以当前语言分享此报告和可视化卡片
Advertisement
PyPI 遥测数据

下载量与社区采用率

最近 30 天(不含镜像)
最近 7 天
48553914
最近 30 天
201204689
总计(180天)
1412384802
指标 / 生态系统 状态 / 数值 来源
Downloads (30d / 180d) — PyPI Stats (without mirrors)
Trusted Publishing (PEP 740) ✓ Verified OIDC PyPI Integrity / Sigstore
Django Packages — djangopackages.org
PyTech / PyPkgScore 920 / 1000 PyPkgScore Engine

健康与工程分析(5大支柱)

1. 治理与社区200 / 200 ▾
LICENSE✓ 50 pts
SECURITY.md✓ 50 pts
CONTRIBUTING.md✓ 50 pts
CODE_OF_CONDUCT.md✓ 50 pts
2. PEP 元数据与打包200 / 200 ▾
Wheel (.whl)✓ 50 pts
pyproject.toml✓ 50 pts
Project URLs✓ 50 pts
Trove Classifiers✓ 50 pts
3. 安全与供应链200 / 200 ▾
零 CVE 漏洞 (OSV)✓ 60 pts
Trusted Publishing (OIDC)✓ 50 pts
Snyk / Audit Link✓ 40 pts
HTTPS 代码仓库✓ 50 pts
4. 文档、SEO 与生态系统155 / 200 ▾
结构化 README✓ 60 pts
Read the Docs✓ 50 pts
Django Packages✕ 0 pts
网站 / 技术文章✓ 45 pts
5. 工程、CI 与代码质量165 / 200 ▾
自动化测试✓ 65 pts
GitHub Actions CI✓ 65 pts
CHANGELOG.md✓ 35 pts
Env & Lockfile (uv/rye/poetry/pdm/hatch)✕ 0 pts
Advertisement
README & DOCS

官方文档与使用指南 — python-discovery

PyPI Metadata v1.9.7
显示完整原始文档(英文 README) ▾

python-discovery

PyPI Supported Python versions Downloads check Documentation Status OpenSSF Scorecard OpenSSF Best Practices

What is python-discovery?

python-discovery is a library for discovering Python interpreters installed on your machine. You may have multiple Python versions from system packages, pyenv, mise, asdf, uv, or the Windows registry (PEP 514). This library finds the right one for you.

Give it a requirement like python3.12 or >=3.11,<3.13, and it searches all known locations, verifies each candidate, and returns detailed metadata about the match. Results are cached to disk so repeated lookups are fast.

The library runs on Python 3.9+ and discovers interpreters as old as Python 3.6; anything older is skipped with a warning naming the version it found.

Usage

from pathlib import Path

from python_discovery import DiskCache, get_interpreter

cache = DiskCache(root=Path("~/.cache/python-discovery").expanduser())
result = get_interpreter("python3.12", cache=cache)
if result is not None:
    print(result.executable)  # /usr/bin/python3.12
    print(result.implementation)  # CPython
    print(result.version_info[:3])  # (3, 12, 1)

The get_interpreter() function accepts various specification formats:

  • Absolute path: /usr/bin/python3.12
  • Version: 3.12
  • Implementation prefix: cpython3.12
  • Version specifier: >=3.10, >=3.11,<3.13

Documentation

Full documentation is available at python-discovery.readthedocs.io