paperap.models.profile.model module


METADATA:

File: profile.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.profile.model.Profile(**data)[source]

Bases: StandardModel

Represents a user profile in the Paperless NGX system.

email

The email address of the user.

password

The password for the user.

first_name

The first name of the user.

last_name

The last name of the user.

auth_token

The authentication token for the user.

social_accounts

A list of social accounts associated with the user.

has_usable_password

Indicates if the user has a usable password.

Examples

>>> profile = Profile(email="a@google.com", password="abc", first_name="John", last_name="Doe")
>>> print(profile.email)
Parameters:

data (Any)

email: str | None
password: str | None
first_name: str | None
last_name: str | None
auth_token: str | None
social_accounts: list[Any]
has_usable_password: bool
class Meta(model)[source]

Bases: Meta

Parameters:

model (type[_Self])

queryset

alias of ProfileQuerySet

blacklist_filtering_params: ClassVar[set[str]] = {}
field_map: dict[str, str] = {}
filtering_disabled: ClassVar[set[str]] = {}
filtering_fields: ClassVar[set[str]] = {'_resource', 'auth_token', 'email', 'first_name', 'has_usable_password', 'id', 'last_name', 'password', 'social_accounts'}
read_only_fields: ClassVar[set[str]] = {'id'}
supported_filtering_params: ClassVar[set[str]] = {'id', 'id__in', 'limit'}
model: type[_Self]
name: str
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

id: int