Skip to main content

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.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cronopy 0.1.0
File Size Uploaded
cronopy-0.1.0.tar.gz 7.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cronopy 0.1.0
File Interpreter ABI Platform
cronopy-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 15.7 kB

Release files / cronopy-0.1.0.tar.gz

Download URL cronopy-0.1.0.tar.gz
Size 7.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6a9b0101da5def1b49779f7a01b3c16903295fe06f8bbd07d0cb67fa85917eee
BLAKE2b-256 checksum
How to use checksums
a67dd8f3f05e620ecf0e19b281d470e950d0c3d337bee33c618a41dae5f2ac10
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.0-py3-none-any.whl

Download URL cronopy-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cac028e0dfdb2d97a436e92613ceb18f8a81a6427ad7233dbafeb329f44926a3
BLAKE2b-256 checksum
How to use checksums
e1faea6dc0b816340fd1533a51c779ff30597925cc0159bdc80ec0e88df5bbe3
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 history Release notifications | RSS feed

0.4.1

2 release files

0.4.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page