Getting Started

Installing the Client

Install the Calcbench client from pip:

$ pip install calcbench-api-client

Obtain Credentials

The API uses the same credentials as If you do not have Calcbench credentials you can sign up for free two-week trial @


Talk to us before you start coding, Calcbench data is not free.

Set Credentials

calcbench.set_credentials(cb_username, cb_password)

Set your calcbench credentials.

Call this before any other Calcbench functions.

Alternatively set the CALCBENCH_USERNAME and CALCBENCH_PASSWORD environment variables

  • cb_username (str) – Your email address

  • cb_password (str) – Your password


>>> calcbench.set_credentials("", "NotMyRealPassword")

Error Retry

calcbench.enable_backoff(backoff_on=True, giveup=<function <lambda>>)

Re-try failed requests with exponential back-off

Requires the backoff package. pip install backoff

If processes make many requests, failures are inevitable. Call this to retry failed requests.

  • backoff_on (bool) – toggle backoff

  • giveup (Callable[[Exception], bool]) – function that handles exception and decides whether to continue or not.

>>> calcbench.enable_backoff(giveup=lambda e: e.response.status_code == 404)

Network Proxy


Set proxies used for requests. See