Skip to main content

Calm Client (Python)

CI PyPI Python License: MIT

Async Python client and CLI for the internal Calm.com API. Browse the catalog, search for content, and stream audio — all from your terminal.

Features

  • CLI + TUI — Browse, search, and play Calm content from the terminal
  • Async API — Fully async Python client built on httpx
  • Type Safe — Comprehensive Pydantic models with py.typed support
  • Audio Playback — Stream meditation and sleep audio via mpv
  • Auth — Email/password login with automatic token refresh

Installation

Use pipx to install the CLI in an isolated environment with zero hassle — no virtualenv management needed:

# Full CLI with audio playback (play, browse) — needs mpv, see Requirements
pipx install 'calm-client[player]'

# CLI and TUI browser without audio playback (login, search, whoami, browse)
pipx install 'calm-client[cli]'

Library

If you want to use calm-client as a Python library in your own project:

pip install calm-client

The plain package installs only the API client and its few dependencies (httpx, pydantic, structlog). The cli and player extras add the terminal UI and audio playback.

Install You get
calm-client Async API client library
calm-client[cli] + calm command and TUI browser
calm-client[player] + audio playback in calm play / calm browse

Requirements

  • Python 3.12+ - for modern typing, async, and f-strings

  • mpv — Required for calm play and calm browse audio features (the player extra loads mpv's libmpv library)

    # Ubuntu/Debian
    sudo apt install mpv libmpv-dev
    
    # macOS
    brew install mpv
    
    # Arch
    sudo pacman -S mpv
    

Quick Start (CLI)

# 1. Login
calm login

# 2. Browse interactively
calm browse

# 3. Or search and play directly
calm search "Sleep Stories"
calm play <program_id>

Quick Start (Python)

import asyncio
from calm_client import CalmClient


async def main():
    async with CalmClient() as client:
        # Authenticate
        await client.login("email@example.com", "password")

        # Get the Sleep feed
        feed = await client.get_feed("sleep")
        print(f"Found {len(feed.items)} items")

        # Search
        results = await client.search("Rain")
        print(f"Found {len(results.items)} results")


if __name__ == "__main__":
    asyncio.run(main())

Documentation

Development

See CONTRIBUTING.md for the full development setup.

# Quick start
uv sync --all-extras --all-groups
uv run hatch test
uv run hatch fmt

License

MIT

Metadata

Release files for calm-client 0.3.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 calm-client 0.3.0
File Size Uploaded Provenance
calm_client-0.3.0.tar.gz 163.5 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for calm-client 0.3.0
File Interpreter ABI Platform
calm_client-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 205.3 kB

Release files / calm_client-0.3.0.tar.gz

Download URL calm_client-0.3.0.tar.gz
Size 163.5 kB
Tags Source
SHA-256 checksum
How to use checksums
4a962a6c18e99ab979826266d0f325271eb8893d0bf4aa1c9220c38ecb3fe2c1
BLAKE2b-256 checksum
How to use checksums
95b634da81a7c0fd08d069b8e7a45b3371e98746b5a3592c9c9f09503338f36d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Release files / calm_client-0.3.0-py3-none-any.whl

Download URL calm_client-0.3.0-py3-none-any.whl
Size 41.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfab0c065c5b92de2a310c179f481b4e4f8cf6bc86c54f7941c530bbb67f932b
BLAKE2b-256 checksum
How to use checksums
4d70e283f5d8e9b71db90ff67ca1d12e287b1076fc1ff2d00a321cedb223e51b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 24, 2026.

Transparency log

Security for calm-client 0.3.0

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for calm_client-0.3.0.tar.gz

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 Oct 24, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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