talk-python-cli 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- talk_python_cli-0.1.2/.claude/settings.local.json +11 -0
- talk_python_cli-0.1.2/PKG-INFO +159 -0
- talk_python_cli-0.1.2/change-log.md +67 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/pyproject.toml +3 -2
- talk_python_cli-0.1.2/src/talk_python_cli/__init__.py +5 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/app.py +38 -7
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/uv.lock +1 -1
- talk_python_cli-0.1.0/.claude/settings.local.json +0 -7
- talk_python_cli-0.1.0/PKG-INFO +0 -25
- talk_python_cli-0.1.0/src/talk_python_cli/__init__.py +0 -3
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/.gitignore +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/LICENSE +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/README.md +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/plans/001-talk-python-cli.plan.md +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/pyrefly.toml +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/ruff.toml +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/__main__.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/client.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/courses.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/episodes.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/formatting.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/src/talk_python_cli/guests.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/__init__.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/conftest.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/test_client.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/test_courses.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/test_episodes.py +0 -0
- {talk_python_cli-0.1.0 → talk_python_cli-0.1.2}/tests/test_guests.py +0 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
{
|
|
2
|
+
"permissions": {
|
|
3
|
+
"allow": [
|
|
4
|
+
"Bash(UV_PROJECT_ENVIRONMENT=venv uv run pytest:*)",
|
|
5
|
+
"Bash(./venv/bin/python -m talk_python_cli.app status:*)",
|
|
6
|
+
"Bash(./venv/bin/talkpython status:*)",
|
|
7
|
+
"Bash(./venv/bin/pip install:*)",
|
|
8
|
+
"Bash(./venv/bin/talkpython:*)"
|
|
9
|
+
]
|
|
10
|
+
}
|
|
11
|
+
}
|
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: talk-python-cli
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: CLI for the Talk Python to Me podcast and courses
|
|
5
|
+
Project-URL: Homepage, https://github.com/talkpython/talk-python-cli
|
|
6
|
+
Project-URL: Source, https://github.com/talkpython/talk-python-cli
|
|
7
|
+
Project-URL: Documentation, https://github.com/talkpython/talk-python-cli
|
|
8
|
+
Author-email: Michael Kennedy <michael@talkpython.fm>
|
|
9
|
+
License-Expression: MIT
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Environment :: Console
|
|
13
|
+
Classifier: Intended Audience :: Developers
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Programming Language :: Python :: 3
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
+
Classifier: Topic :: Education
|
|
21
|
+
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
22
|
+
Requires-Python: >=3.12
|
|
23
|
+
Requires-Dist: cyclopts>=3.0
|
|
24
|
+
Requires-Dist: httpx>=0.27
|
|
25
|
+
Requires-Dist: rich>=13.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# Talk Python CLI
|
|
29
|
+
|
|
30
|
+
[](https://pypi.org/project/talk-python-cli/)
|
|
31
|
+
[](https://www.python.org/downloads/)
|
|
32
|
+
[](https://opensource.org/licenses/MIT)
|
|
33
|
+
|
|
34
|
+
Unlock 500+ episodes of [Talk Python to Me](https://talkpython.fm), full transcripts, guest profiles, and 50+ [Talk Python Training](https://training.talkpython.fm) courses — all from your terminal. Search, browse, and pipe structured data into your scripts, AI agents, or automation workflows.
|
|
35
|
+
|
|
36
|
+
## Why use this?
|
|
37
|
+
|
|
38
|
+
- **Automation** — Query episode data, guest info, and course catalogs from scripts and pipelines.
|
|
39
|
+
- **LLM & AI integration** — Pipe JSON or Markdown output directly into AI agents, RAG systems, or chat workflows. Feed transcripts into RAG pipelines, build podcast assistants, or enrich your AI tools with real Python community knowledge.
|
|
40
|
+
- **Quick lookups** — Search episodes, pull transcripts, and browse courses without leaving the terminal.
|
|
41
|
+
|
|
42
|
+
## Installation
|
|
43
|
+
|
|
44
|
+
Requires Python 3.12+.
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
# Try it instantly with uvx (no install needed)
|
|
48
|
+
uvx --from talk-python-cli talkpython episodes recent
|
|
49
|
+
|
|
50
|
+
# Or install it permanently with uv
|
|
51
|
+
uv tool install talk-python-cli
|
|
52
|
+
|
|
53
|
+
# Or with pip
|
|
54
|
+
pip install talk-python-cli
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
This installs the `talkpython` command.
|
|
58
|
+
|
|
59
|
+
## Quick start
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
# Search for episodes about FastAPI
|
|
63
|
+
talkpython episodes search "FastAPI"
|
|
64
|
+
|
|
65
|
+
# Get full details for a specific episode
|
|
66
|
+
talkpython episodes get 535
|
|
67
|
+
|
|
68
|
+
# Pull the transcript for an episode
|
|
69
|
+
talkpython episodes transcript 535
|
|
70
|
+
|
|
71
|
+
# List recent episodes
|
|
72
|
+
talkpython episodes recent --limit 5
|
|
73
|
+
|
|
74
|
+
# Search for a guest
|
|
75
|
+
talkpython guests search "Hynek"
|
|
76
|
+
|
|
77
|
+
# Browse all training courses
|
|
78
|
+
talkpython courses list
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## Commands
|
|
82
|
+
|
|
83
|
+
### Episodes
|
|
84
|
+
|
|
85
|
+
| Command | Description |
|
|
86
|
+
|---------|-------------|
|
|
87
|
+
| `talkpython episodes search <query> [--limit N]` | Search episodes by keyword (default limit: 10) |
|
|
88
|
+
| `talkpython episodes get <show_id>` | Get full details for an episode |
|
|
89
|
+
| `talkpython episodes list` | List all episodes |
|
|
90
|
+
| `talkpython episodes recent [--limit N]` | Get the most recent episodes |
|
|
91
|
+
| `talkpython episodes transcript <show_id>` | Get the plain-text transcript |
|
|
92
|
+
| `talkpython episodes transcript-vtt <show_id>` | Get the WebVTT transcript (with timestamps) |
|
|
93
|
+
|
|
94
|
+
### Guests
|
|
95
|
+
|
|
96
|
+
| Command | Description |
|
|
97
|
+
|---------|-------------|
|
|
98
|
+
| `talkpython guests search <query> [--limit N]` | Search guests by name |
|
|
99
|
+
| `talkpython guests get <guest_id>` | Get details for a specific guest |
|
|
100
|
+
| `talkpython guests list` | List all guests, sorted by number of appearances |
|
|
101
|
+
|
|
102
|
+
### Courses
|
|
103
|
+
|
|
104
|
+
| Command | Description |
|
|
105
|
+
|---------|-------------|
|
|
106
|
+
| `talkpython courses search <query> [--course_id N]` | Search courses, chapters, and lectures |
|
|
107
|
+
| `talkpython courses get <course_id>` | Get full course details including chapters and lectures |
|
|
108
|
+
| `talkpython courses list` | List all available training courses |
|
|
109
|
+
|
|
110
|
+
## Output formats
|
|
111
|
+
|
|
112
|
+
The CLI auto-detects the best output format:
|
|
113
|
+
|
|
114
|
+
- **Interactive terminal** — Rich-formatted Markdown with styled panels and color.
|
|
115
|
+
- **Piped / redirected** — Compact JSON, ready for processing.
|
|
116
|
+
|
|
117
|
+
Override the default with `--format`:
|
|
118
|
+
|
|
119
|
+
```bash
|
|
120
|
+
# Force JSON output in the terminal
|
|
121
|
+
talkpython --format json episodes search "async"
|
|
122
|
+
|
|
123
|
+
# Force rich text output even when piping
|
|
124
|
+
talkpython --format text episodes recent | less -R
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
## Piping JSON to other tools
|
|
128
|
+
|
|
129
|
+
Because the CLI outputs JSON automatically when piped, it integrates naturally with tools like `jq`, `llm`, or your own scripts:
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
# Extract episode titles with jq
|
|
133
|
+
talkpython episodes search "testing" | jq '.title'
|
|
134
|
+
|
|
135
|
+
# Feed episode data into an LLM
|
|
136
|
+
talkpython episodes get 535 | llm "Summarize this podcast episode"
|
|
137
|
+
|
|
138
|
+
# Grab a transcript for RAG ingestion
|
|
139
|
+
talkpython episodes transcript 535 | your-rag-pipeline ingest
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
## Global options
|
|
143
|
+
|
|
144
|
+
| Option | Description |
|
|
145
|
+
|--------|-------------|
|
|
146
|
+
| `--format text\|json` | Force output format (auto-detected by default) |
|
|
147
|
+
| `--url <mcp-url>` | Override the MCP server URL (default: `https://talkpython.fm/api/mcp`) |
|
|
148
|
+
| `--version`, `-V` | Show version |
|
|
149
|
+
|
|
150
|
+
## Part of the Talk Python ecosystem
|
|
151
|
+
|
|
152
|
+
Talk Python CLI is one way to tap into the data behind the [Talk Python to Me](https://talkpython.fm) podcast and [Talk Python Training](https://training.talkpython.fm) courses. It connects to the same public [MCP server](https://talkpython.fm/api/mcp) that powers Talk Python's AI integrations — so whether you're building an agent, a search tool, or just want quick answers from the terminal, you're working with the real data.
|
|
153
|
+
|
|
154
|
+
- [Talk Python to Me Podcast](https://talkpython.fm)
|
|
155
|
+
- [Talk Python Training](https://training.talkpython.fm)
|
|
156
|
+
|
|
157
|
+
## License
|
|
158
|
+
|
|
159
|
+
MIT
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
# Change Log
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [0.1.2] - 2026-02-07
|
|
9
|
+
|
|
10
|
+
### Added
|
|
11
|
+
- `talkpython status` command to check MCP server health and display version info
|
|
12
|
+
|
|
13
|
+
### Changed
|
|
14
|
+
- Version is now read dynamically from package metadata via `importlib.metadata`
|
|
15
|
+
- Default output format is now always `text` (removed auto-detect that defaulted to `json` when piped)
|
|
16
|
+
- Development status upgraded from Alpha to Beta
|
|
17
|
+
- Added `readme` field to `pyproject.toml` so PyPI renders the README
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## [0.1.0] - 2026-02-06
|
|
22
|
+
|
|
23
|
+
Initial release of the Talk Python CLI.
|
|
24
|
+
|
|
25
|
+
- Query podcast episodes by number or keyword
|
|
26
|
+
- Look up guest appearances
|
|
27
|
+
- Browse and search the Talk Python course catalog
|
|
28
|
+
- Rich terminal output with Markdown rendering
|
|
29
|
+
- JSON output mode via `--format json`
|
|
30
|
+
- Configurable MCP server URL via `--url`
|
|
31
|
+
|
|
32
|
+
---
|
|
33
|
+
|
|
34
|
+
## Template for Future Entries
|
|
35
|
+
|
|
36
|
+
<!--
|
|
37
|
+
## [X.Y.Z] - YYYY-MM-DD
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
- New features or capabilities
|
|
41
|
+
- Files: `path/to/new/file.ext`, `another/file.ext`
|
|
42
|
+
|
|
43
|
+
### Changed
|
|
44
|
+
- Modifications to existing functionality
|
|
45
|
+
- Files: `path/to/modified/file.ext` (summary if many files)
|
|
46
|
+
|
|
47
|
+
### Deprecated
|
|
48
|
+
- Features that will be removed in future versions
|
|
49
|
+
- Files affected: `path/to/deprecated/file.ext`
|
|
50
|
+
|
|
51
|
+
### Removed
|
|
52
|
+
- Features or files that were deleted
|
|
53
|
+
- Files: `path/to/removed/file.ext`
|
|
54
|
+
|
|
55
|
+
### Fixed
|
|
56
|
+
- Bug fixes and corrections
|
|
57
|
+
- Files: `path/to/fixed/file.ext`
|
|
58
|
+
|
|
59
|
+
### Security
|
|
60
|
+
- Security patches or vulnerability fixes
|
|
61
|
+
- Files: `path/to/security/file.ext`
|
|
62
|
+
|
|
63
|
+
### Notes
|
|
64
|
+
- Additional context or important information
|
|
65
|
+
- Major dependencies updated
|
|
66
|
+
- Breaking changes explanation
|
|
67
|
+
-->
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "talk-python-cli"
|
|
3
|
-
version = "0.1.
|
|
3
|
+
version = "0.1.2"
|
|
4
4
|
description = "CLI for the Talk Python to Me podcast and courses"
|
|
5
5
|
requires-python = ">=3.12"
|
|
6
6
|
license = "MIT"
|
|
@@ -8,7 +8,7 @@ authors = [
|
|
|
8
8
|
{ name = "Michael Kennedy", email = "michael@talkpython.fm" },
|
|
9
9
|
]
|
|
10
10
|
classifiers = [
|
|
11
|
-
"Development Status ::
|
|
11
|
+
"Development Status :: 4 - Beta",
|
|
12
12
|
"Environment :: Console",
|
|
13
13
|
"Intended Audience :: Developers",
|
|
14
14
|
"License :: OSI Approved :: MIT License",
|
|
@@ -20,6 +20,7 @@ classifiers = [
|
|
|
20
20
|
"Topic :: Multimedia :: Sound/Audio",
|
|
21
21
|
"Topic :: Education",
|
|
22
22
|
]
|
|
23
|
+
readme = "README.md"
|
|
23
24
|
dependencies = [
|
|
24
25
|
"cyclopts>=3.0",
|
|
25
26
|
"httpx>=0.27",
|
|
@@ -2,14 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
5
|
+
import json
|
|
5
6
|
import sys
|
|
7
|
+
import time
|
|
6
8
|
from typing import Annotated, Literal
|
|
7
9
|
|
|
8
10
|
import cyclopts
|
|
11
|
+
import httpx
|
|
9
12
|
|
|
10
13
|
from talk_python_cli import __version__
|
|
11
14
|
from talk_python_cli.client import DEFAULT_URL, MCPClient
|
|
12
|
-
from talk_python_cli.formatting import
|
|
15
|
+
from talk_python_cli.formatting import console, display_json, print_error
|
|
13
16
|
|
|
14
17
|
# ── Shared state ─────────────────────────────────────────────────────────────
|
|
15
18
|
# The meta-app handler stores the client here so command modules can access it.
|
|
@@ -42,6 +45,38 @@ app.command(guests_app)
|
|
|
42
45
|
app.command(courses_app)
|
|
43
46
|
|
|
44
47
|
|
|
48
|
+
@app.command
|
|
49
|
+
def status() -> None:
|
|
50
|
+
"""Check whether the Talk Python MCP server is up and display its version info."""
|
|
51
|
+
base = _client.base_url if _client else DEFAULT_URL
|
|
52
|
+
t0 = time.monotonic()
|
|
53
|
+
try:
|
|
54
|
+
resp = httpx.get(base, timeout=15.0)
|
|
55
|
+
elapsed_ms = (time.monotonic() - t0) * 1000
|
|
56
|
+
resp.raise_for_status()
|
|
57
|
+
data = resp.json()
|
|
58
|
+
except httpx.HTTPError as exc:
|
|
59
|
+
elapsed_ms = (time.monotonic() - t0) * 1000
|
|
60
|
+
console.print(f'[tp.error]STATUS: FAILED ({elapsed_ms:.2f} ms)[/tp.error]')
|
|
61
|
+
console.print(f'[red]{exc}[/red]')
|
|
62
|
+
sys.exit(1)
|
|
63
|
+
|
|
64
|
+
# If piped / --format json, emit raw JSON
|
|
65
|
+
if _client and _client.output_format == 'json':
|
|
66
|
+
data['status'] = 'SUCCESS'
|
|
67
|
+
data['response_ms'] = round(elapsed_ms, 2)
|
|
68
|
+
display_json(json.dumps(data))
|
|
69
|
+
return
|
|
70
|
+
|
|
71
|
+
console.print()
|
|
72
|
+
console.print(f'[tp.success]STATUS: SUCCESS[/tp.success] [tp.dim]({elapsed_ms:.2f} ms)[/tp.dim]')
|
|
73
|
+
console.print()
|
|
74
|
+
for key in ('name', 'version', 'description', 'documentation'):
|
|
75
|
+
if key in data:
|
|
76
|
+
console.print(f'[tp.label]{key}:[/tp.label] {data[key]}')
|
|
77
|
+
console.print()
|
|
78
|
+
|
|
79
|
+
|
|
45
80
|
# ── Meta-app: handles global options before dispatching to sub-commands ──────
|
|
46
81
|
@app.meta.default
|
|
47
82
|
def launcher(
|
|
@@ -50,9 +85,9 @@ def launcher(
|
|
|
50
85
|
Literal['text', 'json'],
|
|
51
86
|
cyclopts.Parameter(
|
|
52
87
|
name='--format',
|
|
53
|
-
help="Output format: 'text' (rich Markdown) or 'json'.
|
|
88
|
+
help="Output format: 'text' (rich Markdown) or 'json'.",
|
|
54
89
|
),
|
|
55
|
-
] =
|
|
90
|
+
] = 'text',
|
|
56
91
|
url: Annotated[
|
|
57
92
|
str,
|
|
58
93
|
cyclopts.Parameter(
|
|
@@ -64,10 +99,6 @@ def launcher(
|
|
|
64
99
|
) -> None:
|
|
65
100
|
global _client
|
|
66
101
|
|
|
67
|
-
# Auto-detect: default to json when piped, text when interactive
|
|
68
|
-
if format is None:
|
|
69
|
-
format = 'text' if is_tty() else 'json'
|
|
70
|
-
|
|
71
102
|
_client = MCPClient(base_url=url, output_format=format)
|
|
72
103
|
try:
|
|
73
104
|
app(tokens)
|
talk_python_cli-0.1.0/PKG-INFO
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: talk-python-cli
|
|
3
|
-
Version: 0.1.0
|
|
4
|
-
Summary: CLI for the Talk Python to Me podcast and courses
|
|
5
|
-
Project-URL: Homepage, https://github.com/talkpython/talk-python-cli
|
|
6
|
-
Project-URL: Source, https://github.com/talkpython/talk-python-cli
|
|
7
|
-
Project-URL: Documentation, https://github.com/talkpython/talk-python-cli
|
|
8
|
-
Author-email: Michael Kennedy <michael@talkpython.fm>
|
|
9
|
-
License-Expression: MIT
|
|
10
|
-
License-File: LICENSE
|
|
11
|
-
Classifier: Development Status :: 3 - Alpha
|
|
12
|
-
Classifier: Environment :: Console
|
|
13
|
-
Classifier: Intended Audience :: Developers
|
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier: Programming Language :: Python :: 3
|
|
16
|
-
Classifier: Programming Language :: Python :: 3.12
|
|
17
|
-
Classifier: Programming Language :: Python :: 3.13
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.14
|
|
19
|
-
Classifier: Programming Language :: Python :: 3.15
|
|
20
|
-
Classifier: Topic :: Education
|
|
21
|
-
Classifier: Topic :: Multimedia :: Sound/Audio
|
|
22
|
-
Requires-Python: >=3.12
|
|
23
|
-
Requires-Dist: cyclopts>=3.0
|
|
24
|
-
Requires-Dist: httpx>=0.27
|
|
25
|
-
Requires-Dist: rich>=13.0
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|