paperap.models.config.config module


METADATA:

File: config.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.models.config.config.Config(**data)[source]

Bases: StandardModel

Parameters:

data (Any)

user_args: str | None
output_type: str | None
pages: str | None
language: str | None
mode: str | None
skip_archive_file: bool | None
image_dpi: int | None
unpaper_clean: bool | None
deskew: bool
rotate_pages: bool
rotate_pages_threshold: int | None
max_image_pixels: int | None
color_conversion_strategy: str | None
app_title: str
class Meta(model)

Bases: Meta

Parameters:

model (type[_Self])

blacklist_filtering_params: ClassVar[set[str]] = {}
field_map: dict[str, str] = {}
filtering_disabled: ClassVar[set[str]] = {}
filtering_fields: ClassVar[set[str]] = {'_resource', 'app_logo', 'app_title', 'color_conversion_strategy', 'deskew', 'id', 'image_dpi', 'language', 'max_image_pixels', 'mode', 'output_type', 'pages', 'rotate_pages', 'rotate_pages_threshold', 'skip_archive_file', 'unpaper_clean', 'user_args'}
read_only_fields: ClassVar[set[str]] = {'id'}
supported_filtering_params: ClassVar[set[str]] = {'id', 'id__in', 'limit'}
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.

Parameters:
Return type:

None