Resource Handling

ResourceFetcher

plutoprint.ResourceFetcher

Base class for fetching external assets.

  • fetch_url(url: str) -> ResourceData: Override this method to implement custom logic.

DefaultResourceFetcher

plutoprint.DefaultResourceFetcher

The standard implementation used by PlutoPrint. Includes methods to configure SSL and HTTP behavior.

  • set_ssl_verify_peer(verify: bool)
  • set_http_timeout(timeout: int)
  • set_http_follow_redirects(follow: bool)

ResourceData

plutoprint.ResourceData

Container for the binary data of a fetched resource.

  • __init__(content: bytes|str, mime_type: str, text_encoding: str)