Skip to main content

Typed Python SDK for the Lunch Flow API

Project description

LunchFlowPy

Unofficial SDK: This package is not created, maintained, endorsed, or supported by Lunch Flow. It is a community Python SDK for accessing the public Lunch Flow API.

Typed Python SDK for the Lunch Flow API.

Installation

This project uses uv for development:

uv sync --dev

After publishing, install with:

pip install lunchflowpy

Personal API

from lunchflow import LunchFlowClient

client = LunchFlowClient(api_key="YOUR_API_KEY")

accounts = client.list_accounts()
for account in accounts.accounts:
    print(account.id, account.name, account.currency)

transactions = client.get_transactions(
    accounts.accounts[0].id,
    include_pending=True,
    from_date="2026-01-01",
    to_date="2026-01-31",
)

transactions_df = transactions.to_dataframe()

Platform API

from lunchflow import LunchFlowPlatformClient

platform = LunchFlowPlatformClient(
    client_id="CLIENT_ID",
    client_secret="CLIENT_SECRET",
)

tokens = platform.register_user(email="user@example.com")
user_client = LunchFlowPlatformClient(access_token=tokens.access_token)

accounts = user_client.list_accounts()

Build an OAuth authorization URL:

url = platform.authorization_url(
    redirect_uri="https://yourapp.example/callback",
    state="opaque-random-state",
    email="user@example.com",
)

Error Handling

from lunchflow import LunchFlowAPIError, LunchFlowClient

client = LunchFlowClient(api_key="YOUR_API_KEY")

try:
    client.list_accounts()
except LunchFlowAPIError as exc:
    print(exc.status_code, exc.error, exc.message)

Development

uv run pytest -q
uv run mypy
uv run ruff check .
uv build

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lunchflowpy-0.1.4.tar.gz (31.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

lunchflowpy-0.1.4-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

Details for the file lunchflowpy-0.1.4.tar.gz.

File metadata

  • Download URL: lunchflowpy-0.1.4.tar.gz
  • Upload date:
  • Size: 31.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lunchflowpy-0.1.4.tar.gz
Algorithm Hash digest
SHA256 d8c4a173f92f8711916d0645f1cd07a5f104c6c57ed08d6c2cf324cfe81af411
MD5 86fdf1e8bda1f741947822b72f75873e
BLAKE2b-256 a52e2ab91c350f7397609df2236ce6e1e8bd548c01bab77afcfe553c9f4a4952

See more details on using hashes here.

File details

Details for the file lunchflowpy-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: lunchflowpy-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 8.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.12 {"installer":{"name":"uv","version":"0.10.12","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for lunchflowpy-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 44a8016f0d85d6ac009317eb8d73d66ff83eafbb08b331e99a888c4c43cc8b08
MD5 632b3d6ab5a5fa558abd44100c855065
BLAKE2b-256 d77f36dcecde0cb1fefa650dc05e5d2fd42bb4478d0b771c445cd24fd4115a71

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page