paperap.const module
METADATA:
- File: const.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.const.StrEnumWithUnknown(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
StrEnum
- class paperap.const.IntEnumWithUnknown(new_class_name, /, names, *, module=None, qualname=None, type=None, start=1, boundary=None)[source]
Bases:
IntEnum
- class paperap.const.ConstModel(**data)[source]
Bases:
BaseModel- Parameters:
data (
Any)
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.FilteringStrategies(*values)[source]
Bases:
StrEnum- WHITELIST = 'whitelist'
- BLACKLIST = 'blacklist'
- ALLOW_ALL = 'allow_all'
- ALLOW_NONE = 'allow_none'
- class paperap.const.ModelStatus(*values)[source]
Bases:
StrEnum- INITIALIZING = 'initializing'
- UPDATING = 'updating'
- SAVING = 'saving'
- READY = 'ready'
- ERROR = 'error'
- class paperap.const.CustomFieldTypes(*values)[source]
Bases:
StrEnumWithUnknown- STRING = 'string'
- BOOLEAN = 'boolean'
- INTEGER = 'integer'
- FLOAT = 'float'
- MONETARY = 'monetary'
- DATE = 'date'
- URL = 'url'
- DOCUMENT_LINK = 'documentlink'
- UNKNOWN = 'unknown'
- class paperap.const.CustomFieldValues(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- field: int
- value: Any
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.DocumentMetadataType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- namespace: str | None
- prefix: str | None
- key: str | None
- value: str | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.DocumentSearchHitType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- score: float | None
- highlights: str | None
- note_highlights: str | None
- rank: int | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.MatchingAlgorithmType(*values)[source]
Bases:
IntEnumWithUnknown- NONE = 0
- ANY = 1
- ALL = 2
- LITERAL = 3
- REGEX = 4
- FUZZY = 5
- AUTO = 6
- UNKNOWN = -1
- class paperap.const.PermissionSetType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- users: list[int]
- groups: list[int]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.PermissionTableType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- view: PermissionSetType
- change: PermissionSetType
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.RetrieveFileMode(*values)[source]
Bases:
StrEnum- DOWNLOAD = 'download'
- PREVIEW = 'preview'
- THUMBNAIL = 'thumb'
- class paperap.const.SavedViewFilterRuleType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- rule_type: int
- value: str | None
- saved_view: int | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
Bases:
StrEnumWithUnknown
- class paperap.const.StatusType(*values)[source]
Bases:
StrEnumWithUnknown- OK = 'OK'
- ERROR = 'ERROR'
- UNKNOWN = 'UNKNOWN'
- class paperap.const.StatusDatabaseMigrationStatusType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- latest_migration: str | None
- unapplied_migrations: list[str]
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.StatusDatabaseType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- type: str | None
- url: str | None
- status: StatusType | None
- error: str | None
- migration_status: StatusDatabaseMigrationStatusType | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.StatusStorageType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- total: int | None
- available: int | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.StatusTasksType(**data)[source]
Bases:
ConstModel- Parameters:
data (
Any)
- redis_url: str | None
- redis_status: StatusType | None
- redis_error: str | None
- celery_status: StatusType | None
- index_status: StatusType | None
- index_last_modified: datetime | None
- index_error: str | None
- classifier_status: StatusType | None
- classifier_last_trained: datetime | None
- classifier_error: str | None
- model_config: ClassVar[ConfigDict] = {'extra': 'forbid', 'from_attributes': 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].
- class paperap.const.TaskStatusType(*values)[source]
Bases:
StrEnumWithUnknown- PENDING = 'PENDING'
- STARTED = 'STARTED'
- SUCCESS = 'SUCCESS'
- FAILURE = 'FAILURE'
- UNKNOWN = 'UNKNOWN'
- class paperap.const.TaskTypeType(*values)[source]
Bases:
StrEnumWithUnknown- AUTO = 'auto_task'
- SCHEDULED_TASK = 'scheduled_task'
- MANUAL_TASK = 'manual_task'
- UNKNOWN = 'unknown'
- class paperap.const.WorkflowActionType(*values)[source]
Bases:
IntEnumWithUnknown- ASSIGNMENT = 1
- REMOVAL = 2
- EMAIL = 3
- WEBHOOK = 4
- UNKNOWN = -1
- class paperap.const.WorkflowTriggerType(*values)[source]
Bases:
IntEnumWithUnknown- CONSUMPTION = 1
- DOCUMENT_ADDED = 2
- DOCUMENT_UPDATED = 3
- UNKNOWN = -1
- class paperap.const.WorkflowTriggerSourceType(*values)[source]
Bases:
IntEnumWithUnknown- CONSUME_FOLDER = 1
- API_UPLOAD = 2
- MAIL_FETCH = 3
- UNKNOWN = -1
- class paperap.const.WorkflowTriggerMatchingType(*values)[source]
Bases:
IntEnumWithUnknown- NONE = 0
- ANY = 1
- ALL = 2
- LITERAL = 3
- REGEX = 4
- FUZZY = 5
- UNKNOWN = -1
- class paperap.const.ScheduleDateFieldType(*values)[source]
Bases:
StrEnumWithUnknown- ADDED = 'added'
- CREATED = 'created'
- MODIFIED = 'modified'
- CUSTOM_FIELD = 'custom_field'
- UNKNOWN = 'unknown'
- class paperap.const.WorkflowTriggerScheduleDateFieldType(*values)[source]
Bases:
StrEnumWithUnknown- ADDED = 'added'
- CREATED = 'created'
- MODIFIED = 'modified'
- CUSTOM_FIELD = 'custom_field'
- UNKNOWN = 'unknown'
- class paperap.const.SavedViewDisplayModeType(*values)[source]
Bases:
StrEnumWithUnknown- TABLE = 'table'
- SMALL_CARDS = 'smallCards'
- LARGE_CARDS = 'largeCards'
- UNKNOWN = 'unknown'
- class paperap.const.SavedViewDisplayFieldType(*values)[source]
Bases:
StrEnumWithUnknown- TITLE = 'title'
- CREATED = 'created'
- ADDED = 'added'
- TAGS = 'tag'
- CORRESPONDENT = 'correspondent'
- DOCUMENT_TYPE = 'documenttype'
- STORAGE_PATH = 'storagepath'
- NOTES = 'note'
- OWNER = 'owner'
- SHARED = 'shared'
- ASN = 'asn'
- PAGE_COUNT = 'pagecount'
- CUSTOM_FIELD = 'custom_field_%d'
- UNKNOWN = 'unknown'