paperap.models.correspondent.queryset module


METADATA:

File: queryset.py

Project: paperap

Created: 2025-03-04

Version: 0.0.10

Author: Jess Mann Email: jess@jmann.me

Copyright (c) 2025 Jess Mann


LAST MODIFIED:

2025-03-04 By Jess Mann

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

Bases: StandardQuerySet[Correspondent], HasOwner, HasDocumentCount

QuerySet for Paperless-ngx correspondents with specialized filtering methods.

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)

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

Filter correspondents by name.

Parameters:
  • name – The correspondent name to filter by

  • exact (bool) – If True, match the exact name, otherwise use contains

  • value (str)

  • case_insensitive (bool)

Return type:

Self

Returns:

Filtered CorrespondentQuerySet

matching_algorithm(value)[source]

Filter correspondents by their matching algorithm.

Parameters:

value (int) – The matching algorithm ID to filter by

Return type:

Self

Returns:

Filtered CorrespondentQuerySet

match(match, *, exact=True, case_insensitive=True)[source]

Filter correspondents by match.

Parameters:
  • match (str) – The match to filter by

  • exact (bool) – If True, match the exact match, otherwise use contains

  • case_insensitive (bool)

Return type:

Self

Returns:

Filtered CorrespondentQuerySet

case_insensitive(insensitive=True)[source]

Filter correspondents by case sensitivity setting.

Parameters:

insensitive (bool) – If True, get correspondents with case insensitive matching

Return type:

Self

Returns:

Filtered CorrespondentQuerySet

user_can_change(value=True)[source]

Filter correspondents by user change permission.

Parameters:

value (bool) – If True, get correspondents that can be changed by user

Return type:

Self

Returns:

Filtered CorrespondentQuerySet

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

Filter correspondents by slug.

Parameters:
  • value (str) – The slug to filter by

  • exact (bool) – If True, match the exact slug, otherwise use contains

  • case_insensitive (bool) – If True, ignore case when matching

Return type:

Self

Returns:

Filtered CorrespondentQuerySet