Expand description
Upstream docs: many packages ship no documentation (Next.js, Django,
FastAPI…). Their repositories do, under the exact version’s git tag.
This module finds the repository from the package’s own metadata, finds
the tag for the pinned version, and downloads only the docs folders
(Markdown, MDX, reStructuredText) from GitHub into the cache, once.
First-use queries fetch public docs at an immutable release commit. Explicit
fetch also supports major-version docs sites and optional GitHub credentials.
Structs§
Constants§
- FORMAT
- Bump when what
fetchdownloads changes, solockdocs fetchrefreshes older copies (a stale copy is still used until then).
Functions§
- cached
- A previous fetch (with or without files). Never touches the network.
- dir
- fetch
- Download the docs folders of
dep’s repository at the pinned version’s tag. - fetch_
automatic - Anonymous, bounded first-use enrichment; never substitutes a major docs site.
- fetch_
private - Explicit fetch. With
private(lockdocs Pro) it also reads repositories on other git hosts and private repositories, with the user’s own credentials. - needs_
refresh - A prior explicit enrichment is also usable by automatic and offline queries.
- parse_
github - Parse a GitHub URL or shorthand into owner/name.
- repo_of
- The package’s source repository on github.com, from its own metadata.
- repo_
of_ with - Like
repo_of; withany_hosta repository on another git host qualifies too. - stale
- Was this copy made by an older lockdocs that downloaded less?
- tag_
candidates - Tag names projects use for a release.