paperap.models.share_links.queryset module


METADATA:

File: queryset.py

Project: paperap

Created: 2025-03-04

Version: 0.0.5

Author: Jess Mann Email: jess@jmann.me

Copyright (c) 2025 Jess Mann


LAST MODIFIED:

2025-03-04 By Jess Mann

class paperap.models.share_links.queryset.ShareLinksQuerySet(resource, filters=None, _cache=None, _fetch_all=False, _next_url=None, _last_response=None, _iter=None, _urls_fetched=None)[source]

Bases: StandardQuerySet[ShareLinks]

A lazy-loaded, chainable query interface for Paperless NGX resources.

BaseQuerySet provides pagination, filtering, and caching functionality similar to Django’s BaseQuerySet. It’s designed to be lazy - only fetching data when it’s actually needed.

Parameters:
  • resource (BaseResource[_Model, Self])

  • filters (dict[str, Any] | None)

  • _cache (list[_Model] | None)

  • _fetch_all (bool)

  • _next_url (str | None)

  • _last_response (ClientResponse)

  • _iter (Iterator[_Model] | None)

  • _urls_fetched (list[str] | None)

expiration_before(value)[source]

Filter ShareLinks where expiration is before value

Parameters:

value (datetime.datetime | str) – The value to compare against

Returns:

The filtered queryset

Return type:

ShareLinksQuerySet

expiration_after(value)[source]

Filter ShareLinks where expiration is after value

Parameters:

value (datetime.datetime | str) – The value to compare against

Returns:

The filtered queryset

Return type:

ShareLinksQuerySet

slug(value, *, exact=True, case_insensitive=True)[source]

Filter ShareLinks where slug is value

Parameters:
  • value (str) – The value to compare against

  • exact (bool) – Whether the comparison should be exact

  • case_sensitive (bool) – Whether the comparison should be case insensitive

  • case_insensitive (bool)

Returns:

The filtered queryset

Return type:

ShareLinksQuerySet

document(value)[source]

Filter ShareLinks where document is value

Parameters:

value (int | list[int]) – The value to compare against

Returns:

The filtered queryset

Return type:

ShareLinksQuerySet

file_version(value)[source]

Filter ShareLinks where file_version is value

Parameters:

value (str) – The value to compare against

Returns:

The filtered queryset

Return type:

ShareLinksQuerySet

created_before(date)[source]

Filter models created before a given date.

Parameters:

date (datetime) – The date to filter by

Return type:

Self

Returns:

Filtered QuerySet

created_after(date)[source]

Filter models created after a given date.

Parameters:

date (datetime) – The date to filter by

Return type:

Self

Returns:

Filtered QuerySet

created_between(start, end)[source]

Filter models created between two dates.

Parameters:
  • start (datetime) – The start date to filter by

  • end (datetime) – The end date to filter by

Return type:

Self

Returns:

Filtered QuerySet