Skip to content

Personalization

albert.resources.personalization

PersonalizationCategory

Bases: str, Enum

The category of a personalization record.

  • STARRED_PROJECTS: projects the user has starred (pinned).
  • HIDDEN_ROWS: projects or inventory items the user has hidden.
  • SAVED_FILTERS: saved filter views, grouped by sub_category.
  • USER_CONFIGURATION: the user's configuration (one record per user).
  • NOTIFICATION: the user's notification preferences (one record per user).
  • SKILLS: the user's disabled-skills list (one record per user).

Attributes:

Name Type Description
STARRED_PROJECTS
HIDDEN_ROWS
SAVED_FILTERS
USER_CONFIGURATION
NOTIFICATION
SKILLS

STARRED_PROJECTS

STARRED_PROJECTS = 'Starred Projects'

HIDDEN_ROWS

HIDDEN_ROWS = 'Hidden Rows'

SAVED_FILTERS

SAVED_FILTERS = 'Saved Filters'

USER_CONFIGURATION

USER_CONFIGURATION = 'User Configuration'

NOTIFICATION

NOTIFICATION = 'Notification'

SKILLS

SKILLS = 'Skills'

PersonalizationFilter

Bases: BaseAlbertModel

A saved filter entry on a personalization record.

Show JSON schema:
{
  "description": "A saved filter entry on a personalization record.",
  "properties": {
    "filterName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The display name of the filter.",
      "title": "Filtername"
    },
    "url": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The URL the filter points to.",
      "title": "Url"
    },
    "filterType": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The type of the filter (e.g. ``Default`` or ``Custom``).",
      "title": "Filtertype"
    }
  },
  "title": "PersonalizationFilter",
  "type": "object"
}

Fields:

filter_name

filter_name: str | None = None

The display name of the filter.

url

url: str | None = None

The URL the filter points to.

filter_type

filter_type: str | None = None

The type of the filter (e.g. Default or Custom).

Personalization

Bases: BaseResource

A user personalization record in Albert.

Personalization records store per-user preferences such as starred projects, hidden rows, and saved filters. They are managed through the PersonalizationCollection.

Example

from albert.resources.personalization import Personalization, PersonalizationCategory

record = Personalization(
    category=PersonalizationCategory.STARRED_PROJECTS,
    saved_id="PRO123",
    saved_name="Weatherproof Coatings 2026",
)
Show JSON schema:
{
  "$defs": {
    "AuditFields": {
      "description": "The audit fields for a resource",
      "properties": {
        "by": {
          "default": null,
          "title": "By",
          "type": "string"
        },
        "byName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "Byname"
        },
        "at": {
          "anyOf": [
            {
              "format": "date-time",
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "title": "At"
        }
      },
      "title": "AuditFields",
      "type": "object"
    },
    "PersonalizationCategory": {
      "description": "The category of a personalization record.\n\n- ``STARRED_PROJECTS``: projects the user has starred (pinned).\n- ``HIDDEN_ROWS``: projects or inventory items the user has hidden.\n- ``SAVED_FILTERS``: saved filter views, grouped by ``sub_category``.\n- ``USER_CONFIGURATION``: the user's configuration (one record per user).\n- ``NOTIFICATION``: the user's notification preferences (one record per user).\n- ``SKILLS``: the user's disabled-skills list (one record per user).",
      "enum": [
        "Starred Projects",
        "Hidden Rows",
        "Saved Filters",
        "User Configuration",
        "Notification",
        "Skills"
      ],
      "title": "PersonalizationCategory",
      "type": "string"
    },
    "PersonalizationFilter": {
      "description": "A saved filter entry on a personalization record.",
      "properties": {
        "filterName": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The display name of the filter.",
          "title": "Filtername"
        },
        "url": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The URL the filter points to.",
          "title": "Url"
        },
        "filterType": {
          "anyOf": [
            {
              "type": "string"
            },
            {
              "type": "null"
            }
          ],
          "default": null,
          "description": "The type of the filter (e.g. ``Default`` or ``Custom``).",
          "title": "Filtertype"
        }
      },
      "title": "PersonalizationFilter",
      "type": "object"
    },
    "Status": {
      "description": "The status of a resource.\n\nAttributes\n----------\nACTIVE : str\n    The resource is fully operational and visible in normal operations.\nINACTIVE : str\n    The resource is hidden from normal operations and disabled from use.",
      "enum": [
        "active",
        "inactive"
      ],
      "title": "Status",
      "type": "string"
    }
  },
  "description": "A user personalization record in Albert.\n\nPersonalization records store per-user preferences such as starred projects,\nhidden rows, and saved filters. They are managed through the\n[`PersonalizationCollection`][albert.collections.personalization.PersonalizationCollection].\n\n!!! example\n    ```python\n    from albert.resources.personalization import Personalization, PersonalizationCategory\n\n    record = Personalization(\n        category=PersonalizationCategory.STARRED_PROJECTS,\n        saved_id=\"PRO123\",\n        saved_name=\"Weatherproof Coatings 2026\",\n    )\n    ```",
  "properties": {
    "status": {
      "anyOf": [
        {
          "$ref": "#/$defs/Status"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The status of the resource, optional."
    },
    "Created": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the creation of the resource, optional."
    },
    "Updated": {
      "anyOf": [
        {
          "$ref": "#/$defs/AuditFields"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Audit fields for the update of the resource, optional."
    },
    "albertId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The Albert ID of the record (format ``USP...``). Assigned by Albert when the record is created.",
      "title": "Albertid"
    },
    "category": {
      "$ref": "#/$defs/PersonalizationCategory",
      "description": "The category of the record."
    },
    "subCategory": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The subcategory of the record (e.g. the entity a saved filter applies to).",
      "title": "Subcategory"
    },
    "parentId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The ID of the user the record belongs to. Assigned from the authenticated session when the record is created.",
      "title": "Parentid"
    },
    "savedId": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The ID of the saved entity (e.g. a Project ID for a starred project).",
      "title": "Savedid"
    },
    "savedName": {
      "anyOf": [
        {
          "type": "string"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "The display name of the saved entity.",
      "title": "Savedname"
    },
    "Metadata": {
      "anyOf": [
        {
          "additionalProperties": true,
          "type": "object"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Arbitrary metadata key-value pairs stored on the record.",
      "title": "Metadata"
    },
    "filters": {
      "anyOf": [
        {
          "items": {
            "$ref": "#/$defs/PersonalizationFilter"
          },
          "type": "array"
        },
        {
          "type": "null"
        }
      ],
      "default": null,
      "description": "Saved filter entries, present on records in the Saved Filters category.",
      "title": "Filters"
    }
  },
  "required": [
    "category"
  ],
  "title": "Personalization",
  "type": "object"
}

Fields:

id

id: str | None = None

The Albert ID of the record (format USP...). Assigned by Albert when the record is created.

category

The category of the record.

sub_category

sub_category: str | None = None

The subcategory of the record (e.g. the entity a saved filter applies to).

parent_id

parent_id: str | None = None

The ID of the user the record belongs to. Assigned from the authenticated session when the record is created.

saved_id

saved_id: str | None = None

The ID of the saved entity (e.g. a Project ID for a starred project).

saved_name

saved_name: str | None = None

The display name of the saved entity.

metadata

metadata: dict[str, Any] | None = None

Arbitrary metadata key-value pairs stored on the record.

filters

filters: list[PersonalizationFilter] | None = None

Saved filter entries, present on records in the Saved Filters category.