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.
Report Collection of check results for a package.

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

All built-in check implementations

checks.metadata.MetadataCheck Check that package metadata is valid and complete.
checks.structure.StructureCheck Check that package has a valid directory structure.
checks.tests.TestsCheck Run package tests and report results.
checks.linting.LintingCheck Run linting tools on the package.
checks.typing.TypingCheck Run type checking tools on the package.
checks.imports.ImportsCheck Check that all imports in the package can be resolved.
checks.license.LicenseCheck Check that the package has a license file.
checks.docs.DocsCheck Check for documentation presence and quality.

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.