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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lunchflowpy-0.1.1.tar.gz.
File metadata
- Download URL: lunchflowpy-0.1.1.tar.gz
- Upload date:
- Size: 23.7 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
25a84b3673b554822a2a7f41b93ab0d7d0644057de31e3c548324dd0588ad450
|
|
| MD5 |
1ae8134ae967e03cb4024a5b1a8ef461
|
|
| BLAKE2b-256 |
4380b0d9ee89dbf9af38bb511b510c9cf519022ce91ccca698b9475f5b2b940f
|
File details
Details for the file lunchflowpy-0.1.1-py3-none-any.whl.
File metadata
- Download URL: lunchflowpy-0.1.1-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d7f6118537d339e9bfb83d294cd66a544c55e0fd1a493d7081e568aaa808e1b3
|
|
| MD5 |
b7533d32afbb1085a453a5b792d47500
|
|
| BLAKE2b-256 |
875dfc7c2312ac2af57739cec69f6dc5035a719cd28ad15a2ceb261cd6fbb94b
|