Module

health.linkcheck.models

Data models for link checking.

Classes

LinkKind
Kind of link being checked.
0

Kind of link being checked.

Inherits from str,Enum
LinkStatus
Status of link check result.
0

Status of link check result.

Inherits from str,Enum
LinkCheckResult dataclass
Result of checking a single link.
1

Result of checking a single link.

Attributes

Name Type Description
url str
kind LinkKind
status LinkStatus
status_code int | None
reason str | None
first_ref str | None
ref_count int
ignored bool
ignore_reason str | None
error_message str | None
metadata dict[str, Any]

Methods 1

to_dict
Convert to dictionary for JSON serialization.
0 dict[str, Any]
def to_dict(self) -> dict[str, Any]

Convert to dictionary for JSON serialization.

Returns

dict[str, Any]

LinkCheckSummary dataclass
Summary of link check results.
2

Summary of link check results.

Attributes

Name Type Description
total_checked int
ok_count int
broken_count int
ignored_count int
error_count int
duration_ms float

Methods 2

passed property
Return True if no broken or error links found.
bool
def passed(self) -> bool

Return True if no broken or error links found.

Returns

bool

to_dict
Convert to dictionary for JSON serialization.
0 dict[str, Any]
def to_dict(self) -> dict[str, Any]

Convert to dictionary for JSON serialization.

Returns

dict[str, Any]