kaloricketabulky-sdk
Typesafe, async, read-only access to the kaloricketabulky.cz
internal API. The SDK layer (kaloricketabulky.sdk) is self-contained and usable on its own;
the surrounding package adds configuration and a command-line entry point.
The site has no official public API. This is an unofficial client built against the endpoints the web app uses. Use it for your own data only, be a respectful guest: don't hammer the site with requests, keep your polling slow and infrequent, and don't be a dick about it.
If you get value out of kaloricketabulky.cz, please consider supporting them with a subscription.
Requirements
- Python >= 3.12
- uv
Install
uv add kaloricketabulky-sdk
Usage
import asyncio
from datetime import date
from kaloricketabulky.sdk import KaloricketabulkyClient, SnapshotType
async def main() -> None:
async with KaloricketabulkyClient() as client:
await client.login("you@example.com", "password")
diary = await client.get_diary(date(2026, 6, 2))
streak = await client.get_streak(date(2026, 6, 2))
weight = await client.get_snapshot(SnapshotType.WEIGHT, date(2025, 6, 2), date(2026, 6, 2))
print(diary.energy_total, streak, weight.min, weight.max)
asyncio.run(main())
login stores the session cookies on the underlying HTTP client and later requests reuse them.
The session can expire; if a request starts failing, call login again.
CLI
Set KALORICKETABULKY_EMAIL + KALORICKETABULKY_PASSWORD in your environment or a .env file,
then:
uv run kaloricketabulky streak --date 2026-06-02
uv run kaloricketabulky diary --date 2026-06-02
uv run kaloricketabulky snapshot --metric weight --from 2025-06-02 --to 2026-06-02
Retries
The SDK ships no retry logic, to stay thin and to avoid hammering an unofficial API. To add retries or backoff, inject your own client — for example connection-level retries:
import httpx
from kaloricketabulky.sdk import KaloricketabulkyClient
async with httpx.AsyncClient(
base_url="https://www.kaloricketabulky.cz",
transport=httpx.AsyncHTTPTransport(retries=3),
) as http:
client = KaloricketabulkyClient(client=http)
await client.login("you@example.com", "password")
...
A supplied client is not closed by KaloricketabulkyClient — manage its lifecycle yourself (e.g.
async with). Note that login (and any Set-Cookie the server returns) populates the client's
cookie jar; that is how the session is carried. A supplied client must set its own base_url;
the base_url= argument applies only when KaloricketabulkyClient creates its own HTTP client.
Unsure which URL? Reuse Settings.base_url from kaloricketabulky.config.
Development
uv sync # create the environment from the lockfile
uv run pytest # run tests with coverage
uv run ruff format --check . # check formatting
uv run ruff check . # lint
uv run mypy src tests # strict type-check
Layout
src/kaloricketabulky/
__init__.py package version
__main__.py command-line entry point (`kaloricketabulky`)
sdk/ standalone read-only SDK (httpx + pydantic only)
tests/ test suite
Releases
Versioning and the changelog are driven by Commitizen.
Do not edit CHANGELOG.md by hand:
uv run cz bump
License
MIT
Metadata
Release files for kaloricketabulky-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| kaloricketabulky_sdk-0.1.1.tar.gz | 113.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| kaloricketabulky_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 130.9 kB
Release files / kaloricketabulky_sdk-0.1.1.tar.gz
| Download URL | kaloricketabulky_sdk-0.1.1.tar.gz |
|---|---|
| Size | 113.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac62f93207b4ba8f929111510c5d685ae5e2f13946058d26b72bfc687a91cb60
|
|
BLAKE2b-256 checksum How to use checksums |
95950181d0ea7fe4706296d88a226885493e9bda0ca76caba3d79e4a49c7ce02
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency logRelease files / kaloricketabulky_sdk-0.1.1-py3-none-any.whl
| Download URL | kaloricketabulky_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6b50b9ca8d439db0853dfc352e255108431db950fe5aaace19b4c0c1ba273880
|
|
BLAKE2b-256 checksum How to use checksums |
08d7165cf1df4c33e9d82340a6e8499b9ef19e4ee633bddb16799b97c588f620
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jun 5, 2026.
Transparency log