cronopy
Unofficial cli for cronometer.
Install
uv sync
Usage
crono login -e you@example.com # password is prompted (or pass -p)
crono search "chili" -n 10 # table output
crono search "chili" --json # raw JSON
crono whoami
crono logout
The session (cookies and user id) is stored in ~/.config/cronopy/session.json
(or $XDG_CONFIG_HOME/cronopy/session.json) and reused by every command.
GWT hashes are fetched on demand and never persisted, since they change with
each Cronometer frontend deploy.
Library
With credentials (logs in lazily on first use):
from cronopy import CronometerClient
with CronometerClient(email="you@example.com", password="...") as client:
results = client.search("chili", max_results=10)
With a saved session (for example the one written by crono login):
from cronopy import CronometerClient, load_session, save_session
with CronometerClient(load_session()) as client:
results = client.search("chili", max_results=10)
if (updated := client.refresh_session()) is not None:
save_session(updated)
An expired session raises NotAuthenticatedError. Handle it by calling
client.login() (needs credentials) and retrying:
from cronopy import CronometerClient, NotAuthenticatedError, load_session
with CronometerClient(load_session(), email="you@example.com", password="...") as client:
try:
results = client.search("chili")
except NotAuthenticatedError:
client.login()
results = client.search("chili")
Release files for cronopy 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 | |
|---|---|---|---|
| cronopy-0.1.1.tar.gz | 7.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cronopy-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 15.9 kB
Release files / cronopy-0.1.1.tar.gz
| Download URL | cronopy-0.1.1.tar.gz |
|---|---|
| Size | 7.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1300f837f29a50c9d5fb43b55139274b8afa40db4825af8fab39f90889820219
|
|
BLAKE2b-256 checksum How to use checksums |
82bc90570b626484cb585058f6946c00b8eca66fcc52fc4b8d48d433db591d03
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / cronopy-0.1.1-py3-none-any.whl
| Download URL | cronopy-0.1.1-py3-none-any.whl |
|---|---|
| Size | 8.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
781c8da7856440c9ebdb13a06c6fd77ba1eb94543f5e57968bac63acd9e1c386
|
|
BLAKE2b-256 checksum How to use checksums |
b929d7cf422dc791e606ce783e619299303b6cb62ae29b790dedcd46b7c44d8a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.12.18 {"installer":{"name":"uv","version":"0.12.18","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|