paperap.models.document_type.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.document_type.queryset.DocumentTypeQuerySet(resource, filters=None, _cache=None, _fetch_all=False, _next_url=None, _last_response=None, _iter=None, _urls_fetched=None)[source]

Bases: StandardQuerySet[DocumentType], HasOwner, HasDocumentCount

QuerySet for Paperless-ngx document types with specialized filtering methods.

Returns:

A new instance of DocumentTypeQuerySet.

Examples

# Create a DocumentTypeQuerySet instance queryset = DocumentTypeQuerySet()

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 document types by name.

Parameters:
  • value (str) – The document type name to filter by

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

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

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet

Examples

# Filter document types by name filtered = queryset.name(“Invoice”)

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

Filter document types by slug.

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

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

  • case_insensitive (bool)

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet

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

Filter document types by match pattern.

Parameters:
  • value (str) – The pattern to search for in match

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

  • case_insensitive (bool)

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet

matching_algorithm(value)[source]

Filter document types by matching algorithm.

Parameters:

value (int) – The matching algorithm ID

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet

case_insensitive(value=True)[source]

Filter document types by case sensitivity setting.

Parameters:
  • insensitive – If True, get document types with case insensitive matching

  • value (bool)

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet

user_can_change(value=True)[source]

Filter document types by user change permission.

Parameters:

value (bool) – If True, get document types where users can change

Return type:

Self

Returns:

Filtered DocumentTypeQuerySet