paperap.resources.document_download module
METADATA:
- File: documents.py
Project: paperap
- Created: 2025-03-04
Version: 0.0.9
Author: Jess Mann Email: jess@jmann.me
Copyright (c) 2025 Jess Mann
LAST MODIFIED:
2025-03-04 By Jess Mann
- class paperap.resources.document_download.DownloadedDocumentResource(client)[source]
Bases:
StandardResource[DownloadedDocument,DownloadedDocumentQuerySet]Resource for managing downloaded document content.
- Parameters:
client (
PaperlessClient)
- model_class
alias of
DownloadedDocument
- queryset_class
alias of
DownloadedDocumentQuerySet
- name: str = 'document'
- endpoints: ClassVar[Endpoints] = {RetrieveFileMode.DOWNLOAD: <string.Template object>, RetrieveFileMode.PREVIEW: <string.Template object>, RetrieveFileMode.THUMBNAIL: <string.Template object>}
- load(downloaded_document)[source]
Load the document file content from the API.
This method fetches the binary content of the document file and updates the model with the response data.
- Parameters:
downloaded_document (
DownloadedDocument)- Return type:
- client: PaperlessClient