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",
)

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.0.tar.gz (23.6 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.0-py3-none-any.whl (7.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: lunchflowpy-0.1.0.tar.gz
  • Upload date:
  • Size: 23.6 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.0.tar.gz
Algorithm Hash digest
SHA256 cae5cf414a9b9a2c6a5e1335694f7d2e61c6f84da965ff6ec3bd01bfad4b50d1
MD5 eb665813125530e266881d9f9eed62f2
BLAKE2b-256 4a3d98c1de7506227b477b747deba04506254c229f90499c84eb89e0f995db56

See more details on using hashes here.

File details

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

File metadata

  • Download URL: lunchflowpy-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.9 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3dc0e8513a2325cac06487b4d02b5915e12d5dfba206742fbc672416a654bfaa
MD5 5dfc042980770800d8bf49acd4ee094f
BLAKE2b-256 15390bcc01878fab351f1fc3a500c67c0772217d0f36498b3756c1c1743ff735

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