Skip to content

tags#

Lunch Money - Tags

https://lunchmoney.dev/#tags

TagsClient #

Bases: LunchMoneyAPIClient

Lunch Money Tag Interactions

Source code in lunchable/models/tags.py
class TagsClient(LunchMoneyAPIClient):
    """
    Lunch Money Tag Interactions
    """

    def get_tags(self) -> List[TagsObject]:
        """
        Get Spending Tags

        Use this endpoint to get a list of all tags associated with the
        user's account.

        https://lunchmoney.dev/#get-all-tags

        Returns
        -------
        List[TagsObject]
        """
        response_data = self.make_request(
            method=self.Methods.GET, url_path=APIConfig.LUNCHMONEY_TAGS
        )
        tag_objects = [TagsObject.model_validate(item) for item in response_data]
        return tag_objects

get_tags() #

Get Spending Tags

Use this endpoint to get a list of all tags associated with the user's account.

https://lunchmoney.dev/#get-all-tags

Returns:

Type Description
List[TagsObject]
Source code in lunchable/models/tags.py
def get_tags(self) -> List[TagsObject]:
    """
    Get Spending Tags

    Use this endpoint to get a list of all tags associated with the
    user's account.

    https://lunchmoney.dev/#get-all-tags

    Returns
    -------
    List[TagsObject]
    """
    response_data = self.make_request(
        method=self.Methods.GET, url_path=APIConfig.LUNCHMONEY_TAGS
    )
    tag_objects = [TagsObject.model_validate(item) for item in response_data]
    return tag_objects

TagsObject #

Bases: LunchableModel

Lunchmoney Tags object

https://lunchmoney.dev/#tags-object

Parameters:

Name Type Description Default
id int

Unique identifier for tag

required
name str

User-defined name of tag

required
description str | None

User-defined description of tag

None
archived bool

If true, the tag will not show up when creating or updating transactions in the Lunch Money app

False
Source code in lunchable/models/tags.py
class TagsObject(LunchableModel):
    """
    Lunchmoney Tags object

    https://lunchmoney.dev/#tags-object
    """

    id: int = Field(description="Unique identifier for tag")
    name: str = Field(description="User-defined name of tag", min_length=1)
    description: Optional[str] = Field(
        None, description="User-defined description of tag"
    )
    archived: bool = Field(
        False,
        description=(
            "If true, the tag will not show up when creating or "
            "updating transactions in the Lunch Money app"
        ),
    )