API Reference
Main API
Core functions and classes for using pycmdcheck
| check | Check a Python package for quality issues. |
| CheckResult | Result of a single check. |
| CheckStatus | Status of a check result. |
| Finding | One thing a check found, for programs that read the report. |
| Report | Collection of check results for a package. |
| results.most_severe | Return the most severe status among findings. |
Check Protocol
Base classes for implementing custom checks
| checks.base.Check | Protocol defining the interface for all checks. |
| checks.base.BaseCheck | Abstract base class for implementing checks. |
Built-in Checks
The 20 built-in check implementations
| checks.build.BuildCheck | Check that the package can be built into a wheel. |
| checks.changelog.ChangelogCheck | Check for changelog or news file. |
| checks.ci.CICheck | Check for continuous integration configuration. |
| checks.citation.CitationCheck | Check for citation file. |
| checks.community.CommunityCheck | Check for community health files. |
| checks.dependencies.DependenciesCheck | Check that declared dependencies match actual imports. |
| checks.docs.DocsCheck | Check for documentation presence and quality. |
| checks.doctests.DoctestsCheck | Run doctests via pytest –doctest-modules. |
| checks.formatting.FormattingCheck | Check code formatting without modifying files. |
| checks.license.LicenseCheck | Check that the package has a license file. |
| checks.linting.LintingCheck | Run linting tools on the package. |
| checks.metadata.MetadataCheck | Check that package metadata is valid and complete. |
| checks.py_typed.PyTypedCheck | Check for PEP 561 py.typed marker file. |
| checks.python_versions.PythonVersionsCheck | Check that requires-python excludes end-of-life Python versions. |
| checks.structure.StructureCheck | Check that the project has an importable package or module. |
| checks.test_suite.TestSuiteCheck | Check that the project has a test suite. |
| checks.tests.TestsCheck | Run package tests and report results. |
| checks.typing.TypingCheck | Run type checking tools on the package. |
| checks.urls.URLsCheck | Check that project URLs in metadata are reachable. |
| checks.version.VersionCheck | Check that version in code matches pyproject.toml version. |
Deprecated Checks
Kept for one release. A deprecated check is always skipped.
| checks.imports.ImportsCheck | Deprecated alias that points at the dependencies check. |
Profiles
Named sets of checks and the options they set
| profiles.Profile | A named profile defining which checks to run and configuration. |
| profiles.get_profile | Look up a profile by name. |
| profiles.list_profiles | Return all profiles as (name, description) pairs. |
| profiles.apply_profile | Return a copy of config with a profile’s check options applied. |
Runner & Discovery
Advanced API for running checks programmatically
| runner.run_checks | Run checks on a package. |
| discovery.discover_checks | Discover all registered checks via entry points. |
| discovery.list_available_checks | List all available checks with their descriptions. |
Configuration
Configuration loading utilities
| config.load_config | Load pycmdcheck configuration from pyproject.toml. |
| config.get_check_config | Get configuration for a specific check. |
| config.is_check_enabled | Check if a specific check is enabled. |
| config.validate_config | Validate config values and return a list of warning messages. |