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.2.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.2.1
File Size Uploaded Provenance
calm_client-0.2.1.tar.gz 162.9 kB With provenance Details

Built distribution (wheel)

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

Total release size: 204.3 kB

Release files / calm_client-0.2.1.tar.gz

Download URL calm_client-0.2.1.tar.gz
Size 162.9 kB
Tags Source
SHA-256 checksum
How to use checksums
440c578dea98b193974f8886267f735afd933d91aa5743b1d544145537e92a31
BLAKE2b-256 checksum
How to use checksums
1f62d16ba1bd011ca00386b42fdbf61dc79f64aedba73cbab298faf58b2b3979
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 23, 2026.

Transparency log

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

Download URL calm_client-0.2.1-py3-none-any.whl
Size 41.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cde30afd1eaa1d711642b94679b377753cff3b0a74558797f63e02e7a1e1a7ed
BLAKE2b-256 checksum
How to use checksums
c7d6fd25b6ebc1b896c6f4cefbd347b95d48a8fe831f64ebc9f4fd4e0b44c72a
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 23, 2026.

Transparency log

Security for calm-client 0.2.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.2.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 23, 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