Document Loaders¶
Document loaders retrieve remote JSON-LD documents and contexts. PyLD ships
class-based loaders for common cases and supports custom subclasses of
DocumentLoader.
-
Synchronous remote document loading with
requests. -
Asynchronous fetching with
aiohttpwhile JSON-LD processing stays synchronous. -
Serve only documents from an allowlist for air-gapped or reproducible runs.
-
Subclass
DocumentLoaderfor application-specific loading logic.
Default Document Loader¶
The default document loader is selected at import time. PyLD uses
RequestsDocumentLoader if requests is available, falls back to
AioHttpDocumentLoader if aiohttp is available, and otherwise installs a
dummy loader that raises when invoked.