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.2.tar.gz (31.3 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.2-py3-none-any.whl (8.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunchflowpy-0.1.2.tar.gz
  • Upload date:
  • Size: 31.3 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.2.tar.gz
Algorithm Hash digest
SHA256 2edb5d2941b1236c242b8d1128d248405a7e9a17be8eb8376a1b7742140c2e07
MD5 3bae0e63122aa59742b3102f0d07356c
BLAKE2b-256 72c52bb8b8810b7a59359d4ec7c79d97eadb25887d22b17799b42e885e42bef3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunchflowpy-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 873c740eb073d17a83d287bd710a6bac0609388c7cb3f50a332b4820a3a0ddd8
MD5 1480f8bf81050c3f7021961510308030
BLAKE2b-256 1bcf6741682b7e1e1c25ef78a8f4600af7a17835467146bf0fd880b4c217ac8a

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