flashdata-youtube-transcript 0.1.0__tar.gz → 0.1.1__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.
Files changed (16) hide show
  1. flashdata_youtube_transcript-0.1.1/PKG-INFO +95 -0
  2. flashdata_youtube_transcript-0.1.1/README.md +73 -0
  3. flashdata_youtube_transcript-0.1.1/flashdata_youtube_transcript_cli/__init__.py +1 -0
  4. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/_client.py +1 -1
  5. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/pyproject.toml +2 -2
  6. flashdata_youtube_transcript-0.1.0/PKG-INFO +0 -92
  7. flashdata_youtube_transcript-0.1.0/README.md +0 -70
  8. flashdata_youtube_transcript-0.1.0/flashdata_youtube_transcript_cli/__init__.py +0 -1
  9. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/.gitignore +0 -0
  10. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/LICENSE +0 -0
  11. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/_capability.py +0 -0
  12. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/_inputs.py +0 -0
  13. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/_storage.py +0 -0
  14. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/cli.py +0 -0
  15. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/flashdata_youtube_transcript_cli/storage.schema.json +0 -0
  16. {flashdata_youtube_transcript-0.1.0 → flashdata_youtube_transcript-0.1.1}/input.schema.json +0 -0
@@ -0,0 +1,95 @@
1
+ Metadata-Version: 2.5
2
+ Name: flashdata-youtube-transcript
3
+ Version: 0.1.1
4
+ Summary: Retrieve existing YouTube transcripts as timestamped segments and full text in JSON; automatic captions by default.
5
+ Project-URL: Homepage, https://flashdata.dev/docs/sources/youtube_transcript
6
+ Project-URL: Documentation, https://flashdata.dev/docs/sources/youtube_transcript
7
+ Project-URL: Pricing, https://flashdata.dev/pricing
8
+ Project-URL: Support, https://flashdata.dev
9
+ Project-URL: Source, https://github.com/rocosen/flashdata-mcp/tree/main/packages/python-cli
10
+ Author-email: FlashData <support@flashdata.dev>
11
+ License-Expression: MIT
12
+ License-File: LICENSE
13
+ Keywords: cli,flashdata,json,uvx,youtube-transcript
14
+ Classifier: Environment :: Console
15
+ Classifier: Intended Audience :: Developers
16
+ Classifier: Programming Language :: Python :: 3
17
+ Requires-Python: >=3.10
18
+ Requires-Dist: httpx<1,>=0.28.1
19
+ Requires-Dist: jsonschema<5,>=4.23
20
+ Requires-Dist: pydantic<3,>=2.7.4
21
+ Description-Content-Type: text/markdown
22
+
23
+ # YouTube Transcript CLI
24
+
25
+ Retrieve existing YouTube transcripts as timestamped segments and full text in JSON; automatic captions by default.
26
+
27
+ Uses the [FlashData YouTube Transcript API](https://flashdata.dev/docs/sources/youtube_transcript).
28
+
29
+ ## Installation
30
+
31
+ Requires Python 3.10 or newer:
32
+
33
+ ```sh
34
+ python -m pip install flashdata-youtube-transcript==0.1.1
35
+ ```
36
+
37
+ Or run it without a persistent install using [uvx](https://docs.astral.sh/uv/guides/tools/),
38
+ as in the examples below. The installed command is `flashdata-youtube-transcript`.
39
+
40
+ ## Quick start
41
+
42
+ Create a [FlashData API key](https://flashdata.dev/app/api-keys) with `youtube_transcript` access,
43
+ then set `FLASHDATA_API_KEY` in your environment or secret manager. API calls use your
44
+ FlashData Credits.
45
+
46
+ ```sh
47
+ export FLASHDATA_API_KEY='YOUR_API_KEY'
48
+ uvx flashdata-youtube-transcript@0.1.1 --video-id dQw4w9WgXcQ --options-json '{"language": "en", "auto": true}' --output result.json
49
+ ```
50
+
51
+ Omit `--output` to write JSON to stdout. An output file must not already exist; the CLI
52
+ checks this before making a request. API keys are read from the environment, not command flags.
53
+
54
+ ## Inputs
55
+
56
+ Use `--video-id` for the primary input. Pass additional fields through
57
+ `--options-json`. Options are validated against this package's source schema.
58
+
59
+ | Option | Meaning |
60
+ | --- | --- |
61
+ | `language` | Requested caption language code. Default: `"en"`. |
62
+ | `auto` | True requests automatic captions; false requests manually authored captions. Default: `true`. |
63
+
64
+ Inspect all fields, nested filters and defaults locally:
65
+
66
+ ```sh
67
+ uvx flashdata-youtube-transcript@0.1.1 --schema
68
+ ```
69
+
70
+ `--schema`, `--help` and `--version` do not require an API key or make an API call.
71
+
72
+ ## Output and limits
73
+
74
+ The JSON response preserves the API envelope and available fields: results[]: videoId, languageCode, isAutoGenerated, segments, fullText; usage.credits.
75
+
76
+ Reads an existing track. No ASR, translation, or automatic fallback to uploader captions.
77
+
78
+ ## Pricing and errors
79
+
80
+ This MIT-licensed CLI is free to install. API calls use your own
81
+ [FlashData Credits](https://flashdata.dev/pricing).
82
+
83
+ Requests are not automatically retried. A timeout can occur after a request is accepted;
84
+ check your FlashData query history before resubmitting. Each HTTP request has a 120-second
85
+ network timeout, a 15-second connect timeout and a 20-MiB response limit.
86
+
87
+ Errors go to stderr. Exit codes: `0` for exported output, `2` for local input/configuration
88
+ errors, and `1` for request/output errors.
89
+ A partial output file is retained on failure; check the request before retrying because of
90
+ an output error. HTTP `401` indicates an API key issue, `402` insufficient Credits, and
91
+ `429` a rate or quota limit.
92
+
93
+ [API reference](https://flashdata.dev/docs/sources/youtube_transcript) ·
94
+ [Privacy policy](https://flashdata.dev/legal/privacy) ·
95
+ [Source code](https://github.com/rocosen/flashdata-mcp/tree/main/packages/python-cli)
@@ -0,0 +1,73 @@
1
+ # YouTube Transcript CLI
2
+
3
+ Retrieve existing YouTube transcripts as timestamped segments and full text in JSON; automatic captions by default.
4
+
5
+ Uses the [FlashData YouTube Transcript API](https://flashdata.dev/docs/sources/youtube_transcript).
6
+
7
+ ## Installation
8
+
9
+ Requires Python 3.10 or newer:
10
+
11
+ ```sh
12
+ python -m pip install flashdata-youtube-transcript==0.1.1
13
+ ```
14
+
15
+ Or run it without a persistent install using [uvx](https://docs.astral.sh/uv/guides/tools/),
16
+ as in the examples below. The installed command is `flashdata-youtube-transcript`.
17
+
18
+ ## Quick start
19
+
20
+ Create a [FlashData API key](https://flashdata.dev/app/api-keys) with `youtube_transcript` access,
21
+ then set `FLASHDATA_API_KEY` in your environment or secret manager. API calls use your
22
+ FlashData Credits.
23
+
24
+ ```sh
25
+ export FLASHDATA_API_KEY='YOUR_API_KEY'
26
+ uvx flashdata-youtube-transcript@0.1.1 --video-id dQw4w9WgXcQ --options-json '{"language": "en", "auto": true}' --output result.json
27
+ ```
28
+
29
+ Omit `--output` to write JSON to stdout. An output file must not already exist; the CLI
30
+ checks this before making a request. API keys are read from the environment, not command flags.
31
+
32
+ ## Inputs
33
+
34
+ Use `--video-id` for the primary input. Pass additional fields through
35
+ `--options-json`. Options are validated against this package's source schema.
36
+
37
+ | Option | Meaning |
38
+ | --- | --- |
39
+ | `language` | Requested caption language code. Default: `"en"`. |
40
+ | `auto` | True requests automatic captions; false requests manually authored captions. Default: `true`. |
41
+
42
+ Inspect all fields, nested filters and defaults locally:
43
+
44
+ ```sh
45
+ uvx flashdata-youtube-transcript@0.1.1 --schema
46
+ ```
47
+
48
+ `--schema`, `--help` and `--version` do not require an API key or make an API call.
49
+
50
+ ## Output and limits
51
+
52
+ The JSON response preserves the API envelope and available fields: results[]: videoId, languageCode, isAutoGenerated, segments, fullText; usage.credits.
53
+
54
+ Reads an existing track. No ASR, translation, or automatic fallback to uploader captions.
55
+
56
+ ## Pricing and errors
57
+
58
+ This MIT-licensed CLI is free to install. API calls use your own
59
+ [FlashData Credits](https://flashdata.dev/pricing).
60
+
61
+ Requests are not automatically retried. A timeout can occur after a request is accepted;
62
+ check your FlashData query history before resubmitting. Each HTTP request has a 120-second
63
+ network timeout, a 15-second connect timeout and a 20-MiB response limit.
64
+
65
+ Errors go to stderr. Exit codes: `0` for exported output, `2` for local input/configuration
66
+ errors, and `1` for request/output errors.
67
+ A partial output file is retained on failure; check the request before retrying because of
68
+ an output error. HTTP `401` indicates an API key issue, `402` insufficient Credits, and
69
+ `429` a rate or quota limit.
70
+
71
+ [API reference](https://flashdata.dev/docs/sources/youtube_transcript) ·
72
+ [Privacy policy](https://flashdata.dev/legal/privacy) ·
73
+ [Source code](https://github.com/rocosen/flashdata-mcp/tree/main/packages/python-cli)
@@ -27,7 +27,7 @@ class Client:
27
27
  self.transport = transport
28
28
 
29
29
  def _request(self, method, url, payload=None, *, authenticated=True):
30
- headers = {"Accept": "application/json", "User-Agent": "flashdata-cli/0.1.0"}
30
+ headers = {"Accept": "application/json", "User-Agent": "flashdata-cli/0.1.1"}
31
31
  if authenticated:
32
32
  headers.update({"X-API-Key": self.api_key, "X-Request-Id": str(uuid4())})
33
33
  try:
@@ -4,8 +4,8 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "flashdata-youtube-transcript"
7
- version = "0.1.0"
8
- description = "Export timestamped automatic captions for retrieval with the FlashData JSON CLI"
7
+ version = "0.1.1"
8
+ description = "Retrieve existing YouTube transcripts as timestamped segments and full text in JSON; automatic captions by default."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = "MIT"
@@ -1,92 +0,0 @@
1
- Metadata-Version: 2.5
2
- Name: flashdata-youtube-transcript
3
- Version: 0.1.0
4
- Summary: Export timestamped automatic captions for retrieval with the FlashData JSON CLI
5
- Project-URL: Homepage, https://flashdata.dev/docs/sources/youtube_transcript
6
- Project-URL: Documentation, https://flashdata.dev/docs/sources/youtube_transcript
7
- Project-URL: Pricing, https://flashdata.dev/pricing
8
- Project-URL: Support, https://flashdata.dev
9
- Project-URL: Source, https://github.com/rocosen/flashdata-mcp/tree/main/packages/python-cli
10
- Author-email: FlashData <support@flashdata.dev>
11
- License-Expression: MIT
12
- License-File: LICENSE
13
- Keywords: cli,flashdata,json,uvx,youtube-transcript
14
- Classifier: Environment :: Console
15
- Classifier: Intended Audience :: Developers
16
- Classifier: Programming Language :: Python :: 3
17
- Requires-Python: >=3.10
18
- Requires-Dist: httpx<1,>=0.28.1
19
- Requires-Dist: jsonschema<5,>=4.23
20
- Requires-Dist: pydantic<3,>=2.7.4
21
- Description-Content-Type: text/markdown
22
-
23
- # YouTube Transcript CLI — FlashData
24
-
25
- Export timestamped automatic captions for retrieval. This command calls the `youtube_transcript` API and returns JSON for your
26
- shell script, data pipeline or agent tool runner. It does not invoke a language model.
27
-
28
- Reads an existing track. No ASR, translation, or automatic fallback to uploader captions.
29
-
30
- ## Install and run
31
-
32
- Requires Python 3.10 or newer. [uv installation](https://docs.astral.sh/uv/getting-started/installation/)
33
- provides `uvx`, which runs this package in an isolated environment.
34
-
35
- 1. [Create a FlashData account](https://flashdata.dev/signup), obtain an API Key and fund Credits.
36
- 2. Set `FLASHDATA_API_KEY` using your shell or secret manager. The CLI does not accept a key flag
37
- or persist credentials. [Authentication and source documentation](https://flashdata.dev/docs/sources/youtube_transcript).
38
- 3. Run this example after reviewing the input and cost:
39
-
40
- ```sh
41
- uvx flashdata-youtube-transcript@0.1.0 --video-id dQw4w9WgXcQ --options-json '{"language": "en", "auto": true}' --output result.json
42
- ```
43
-
44
- `--output` creates a new file with owner-only permissions where supported and refuses existing
45
- files before making a paid request. Without it, the full JSON response goes to stdout. Errors
46
- go to stderr. Exit 0 means the response was exported, 2 means local input/configuration failure,
47
- and 1 means request or output failure. For downloads, exit 0 can describe an unfinished job.
48
-
49
- For repeated use, install `uv tool install flashdata-youtube-transcript==0.1.0`; the command name is `flashdata-youtube-transcript`.
50
- Alternatively use `python -m pip install flashdata-youtube-transcript==0.1.0` in your virtual environment.
51
-
52
- ## Inputs and output
53
-
54
- Use `--video-id` for the primary input. Additional options use
55
- `--options-json` as a JSON object, with strict field/type/range validation. Source is fixed by
56
- this package. Google count and locale options remain omitted unless supplied.
57
-
58
- | Option | Meaning |
59
- | --- | --- |
60
- | `language` | Requested caption language code. Default: `"en"`. |
61
- | `auto` | True requests automatic captions; false requests manually authored captions. Default: `true`. |
62
-
63
- Run `uvx flashdata-youtube-transcript@0.1.0 --schema` to inspect all fields, nested filters, allowed values and
64
- defaults without a Key or an API call. `--help` and `--version` are also local-only.
65
-
66
- The JSON output preserves the API result envelope and optional fields: results[]: videoId, languageCode, isAutoGenerated, segments, fullText; usage.credits.
67
- Missing fields remain missing; empty results remain empty. No article text, translated captions,
68
- model conclusions, rights grants or keyword volumes are invented. Exact source contracts are
69
- documented [here](https://flashdata.dev/docs/sources/youtube_transcript).
70
-
71
- ## Fees and failure handling
72
-
73
- This MIT-licensed CLI is free to install. FlashData API requests consume paid Credits;
74
- [current pricing](https://flashdata.dev/pricing) applies. Extended YouTube Search has a separate
75
- rate. Media delivery is billed by delivered volume, and your cloud-storage costs are separate.
76
- There is no automatic pagination, retry, polling, scheduled execution or model call.
77
-
78
- Each HTTP request has a 120-second network timeout (15-second connect timeout) and a 20-MiB response
79
- limit. A timeout or failure may occur after a paid request has been accepted. Check Jobs in
80
- the [FlashData console](https://flashdata.dev) before resubmitting. HTTP 401 means check the Key;
81
- 402 means insufficient Credits; 429 means rate/quota limit. A partial output file is retained
82
- on failure. Do not retry a paid query just because output handling failed.
83
-
84
- Input values and your API Key are sent to FlashData to perform the request. A completed
85
- download-result read may fetch a signed JSON object from the result origin returned by
86
- FlashData; the API Key is never sent to that object URL. Only process data appropriate for
87
- your output destination. [Privacy policy](https://flashdata.dev/legal/privacy).
88
-
89
- Source and MIT license are included in the source distribution.
90
-
91
- [Source documentation](https://flashdata.dev/docs/sources/youtube_transcript) ·
92
- [Pricing](https://flashdata.dev/pricing) · [Sign up](https://flashdata.dev/signup)
@@ -1,70 +0,0 @@
1
- # YouTube Transcript CLI — FlashData
2
-
3
- Export timestamped automatic captions for retrieval. This command calls the `youtube_transcript` API and returns JSON for your
4
- shell script, data pipeline or agent tool runner. It does not invoke a language model.
5
-
6
- Reads an existing track. No ASR, translation, or automatic fallback to uploader captions.
7
-
8
- ## Install and run
9
-
10
- Requires Python 3.10 or newer. [uv installation](https://docs.astral.sh/uv/getting-started/installation/)
11
- provides `uvx`, which runs this package in an isolated environment.
12
-
13
- 1. [Create a FlashData account](https://flashdata.dev/signup), obtain an API Key and fund Credits.
14
- 2. Set `FLASHDATA_API_KEY` using your shell or secret manager. The CLI does not accept a key flag
15
- or persist credentials. [Authentication and source documentation](https://flashdata.dev/docs/sources/youtube_transcript).
16
- 3. Run this example after reviewing the input and cost:
17
-
18
- ```sh
19
- uvx flashdata-youtube-transcript@0.1.0 --video-id dQw4w9WgXcQ --options-json '{"language": "en", "auto": true}' --output result.json
20
- ```
21
-
22
- `--output` creates a new file with owner-only permissions where supported and refuses existing
23
- files before making a paid request. Without it, the full JSON response goes to stdout. Errors
24
- go to stderr. Exit 0 means the response was exported, 2 means local input/configuration failure,
25
- and 1 means request or output failure. For downloads, exit 0 can describe an unfinished job.
26
-
27
- For repeated use, install `uv tool install flashdata-youtube-transcript==0.1.0`; the command name is `flashdata-youtube-transcript`.
28
- Alternatively use `python -m pip install flashdata-youtube-transcript==0.1.0` in your virtual environment.
29
-
30
- ## Inputs and output
31
-
32
- Use `--video-id` for the primary input. Additional options use
33
- `--options-json` as a JSON object, with strict field/type/range validation. Source is fixed by
34
- this package. Google count and locale options remain omitted unless supplied.
35
-
36
- | Option | Meaning |
37
- | --- | --- |
38
- | `language` | Requested caption language code. Default: `"en"`. |
39
- | `auto` | True requests automatic captions; false requests manually authored captions. Default: `true`. |
40
-
41
- Run `uvx flashdata-youtube-transcript@0.1.0 --schema` to inspect all fields, nested filters, allowed values and
42
- defaults without a Key or an API call. `--help` and `--version` are also local-only.
43
-
44
- The JSON output preserves the API result envelope and optional fields: results[]: videoId, languageCode, isAutoGenerated, segments, fullText; usage.credits.
45
- Missing fields remain missing; empty results remain empty. No article text, translated captions,
46
- model conclusions, rights grants or keyword volumes are invented. Exact source contracts are
47
- documented [here](https://flashdata.dev/docs/sources/youtube_transcript).
48
-
49
- ## Fees and failure handling
50
-
51
- This MIT-licensed CLI is free to install. FlashData API requests consume paid Credits;
52
- [current pricing](https://flashdata.dev/pricing) applies. Extended YouTube Search has a separate
53
- rate. Media delivery is billed by delivered volume, and your cloud-storage costs are separate.
54
- There is no automatic pagination, retry, polling, scheduled execution or model call.
55
-
56
- Each HTTP request has a 120-second network timeout (15-second connect timeout) and a 20-MiB response
57
- limit. A timeout or failure may occur after a paid request has been accepted. Check Jobs in
58
- the [FlashData console](https://flashdata.dev) before resubmitting. HTTP 401 means check the Key;
59
- 402 means insufficient Credits; 429 means rate/quota limit. A partial output file is retained
60
- on failure. Do not retry a paid query just because output handling failed.
61
-
62
- Input values and your API Key are sent to FlashData to perform the request. A completed
63
- download-result read may fetch a signed JSON object from the result origin returned by
64
- FlashData; the API Key is never sent to that object URL. Only process data appropriate for
65
- your output destination. [Privacy policy](https://flashdata.dev/legal/privacy).
66
-
67
- Source and MIT license are included in the source distribution.
68
-
69
- [Source documentation](https://flashdata.dev/docs/sources/youtube_transcript) ·
70
- [Pricing](https://flashdata.dev/pricing) · [Sign up](https://flashdata.dev/signup)