Skip to content

user#

Lunch Money - User

https://lunchmoney.dev/#user

UserClient #

Bases: LunchMoneyAPIClient

Lunch Money Interactions for Non Finance Operations

Source code in lunchable/models/user.py
class UserClient(LunchMoneyAPIClient):
    """
    Lunch Money Interactions for Non Finance Operations
    """

    def get_user(self) -> UserObject:
        """
        Get Personal User Details

        Use this endpoint to get details on the current user.

        https://lunchmoney.dev/#get-user

        Returns
        -------
        UserObject
        """
        response_data = self.make_request(
            method=self.Methods.GET, url_path=APIConfig.LUNCHMONEY_ME
        )
        me = UserObject.model_validate(response_data)
        return me

get_user() #

Get Personal User Details

Use this endpoint to get details on the current user.

https://lunchmoney.dev/#get-user

Returns:

Type Description
UserObject
Source code in lunchable/models/user.py
def get_user(self) -> UserObject:
    """
    Get Personal User Details

    Use this endpoint to get details on the current user.

    https://lunchmoney.dev/#get-user

    Returns
    -------
    UserObject
    """
    response_data = self.make_request(
        method=self.Methods.GET, url_path=APIConfig.LUNCHMONEY_ME
    )
    me = UserObject.model_validate(response_data)
    return me

UserObject #

Bases: LunchableModel

The LunchMoney User object

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

Parameters:

Name Type Description Default
user_id int

Unique identifier for user

required
user_name str

User's' name

required
user_email str

User's' Email

required
account_id int

Unique identifier for the associated budgeting account

required
budget_name str

Name of the associated budgeting account

required
api_key_label str | None

User-defined label of the developer API key used. Returns null if nothing has been set.

None
Source code in lunchable/models/user.py
class UserObject(LunchableModel):
    """
    The LunchMoney `User` object

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

    user_id: int = Field(description="Unique identifier for user")
    user_name: str = Field(description="User's' name")
    user_email: str = Field(description="User's' Email")
    account_id: int = Field(
        description="Unique identifier for the associated budgeting account"
    )
    budget_name: str = Field(description="Name of the associated budgeting account")
    api_key_label: Optional[str] = Field(
        None,
        description="User-defined label of the developer API key used. "
        "Returns null if nothing has been set.",
    )