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

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.4.1
File Size Uploaded Provenance
calm_client-0.4.1.tar.gz 167.3 kB With provenance Details

Built distribution (wheel)

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

Total release size: 210.6 kB

Release files / calm_client-0.4.1.tar.gz

Download URL calm_client-0.4.1.tar.gz
Size 167.3 kB
Tags Source
SHA-256 checksum
How to use checksums
f68361f1df0d0246ebe5f9fac36e4ad79b7dde4e1841c937d03d4639b8d2238d
BLAKE2b-256 checksum
How to use checksums
b833e95755ce93a68d7d54790889fe930c195db8f6a63b6bf535b3022388076d
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.4.1-py3-none-any.whl

Download URL calm_client-0.4.1-py3-none-any.whl
Size 43.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
80956bb471fedde1a06341b22f152b0b827709e2197bb22174d6939fe9a32e9f
BLAKE2b-256 checksum
How to use checksums
11a37e4d046b1b79e612576c68c0843188753f5758acb3d53154d386bddb755a
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.4.1

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