paperap.models.tag.model module
METADATA:
- File: tag.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.tag.model.Tag(**data)[source]
Bases:
StandardModel,MatcherMixinRepresents a tag in Paperless-NgX.
- Parameters:
data (
Any)
- name: str | None
- slug: str | None
- colour: str | int | None
- is_inbox_tag: bool | None
- document_count: int
- owner: int | None
- user_can_change: bool | None
- class Meta(model)[source]
Bases:
Meta- Parameters:
model (type[_Self])
- read_only_fields: ClassVar[set[str]] = {'document_count', 'id', 'slug'}
- queryset
alias of
TagQuerySet
- blacklist_filtering_params: ClassVar[set[str]] = {}
- field_map: dict[str, str] = {}
- filtering_disabled: ClassVar[set[str]] = {}
- filtering_fields: ClassVar[set[str]] = {'_resource', 'colour', 'document_count', 'id', 'is_inbox_tag', 'name', 'owner', 'slug', 'user_can_change'}
- supported_filtering_params: ClassVar[set[str]] = {'id', 'id__in', 'limit'}
- model: type[_Self]
- name: str
- property documents: DocumentQuerySet
Get documents with this tag.
- Returns:
List of documents.
- model_config: ClassVar[ConfigDict] = {'arbitrary_types_allowed': True, 'extra': 'ignore', 'populate_by_name': True, 'use_enum_values': True, 'validate_assignment': True, 'validate_default': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- model_post_init(context: Any, /) None
We need to both initialize private attributes and call the user-defined model_post_init method.
- id: int