YouTerm
CLI tool to search for YouTube videos and play selected
video/audio via mpv.
Requirements
YouTube API
youterm retrieves video informations using YouTube APIs. An API key is
needed. You can obtain one registering a Google developer profile, adding a
project and creating an API key adding the YouTube Data API v3 service at
this link.
Dependencies
youterm does not rely on external Python libraries, although it uses
external programs to provide audio/video streaming:
mpvyt-dlporyoutube-dl
Optional dependencies
To store the YouTube API safely the unix standard password manager pass
is required. youterm looks for one password entry containing the API key at
api/youtube, or any custom specified entry1, in the password-store2.
Alternatively you can pass the API key to youterm as a command line argument
(see Usage) or using a config file3 (see
Configuration).
Installation
Install youterm using pip:
pip3 install youterm
Usage
Invoking youterm with no flags defaults to audio only. Below the usage:
usage: youterm [-h] [-v] [-r <n>] [-a <api_key>] [-q <resolution>]
CLI tool to search for YouTube videos and play selected audio/video via MPV
options:
-h, --help show this help message and exit
-v, --video Play video
-r <n>, --results <n>
Number of search results displayed
-a <api_key>, --api <api_key>
YouTube Data API v3 key
-q <resolution>, --quality <resolution>
Choose video quality (if not available choose closest lower)
Configuration
You can specify your default options for youterm using a config file4
located at:
~/.config/youterm/configon Linux and Unix based systems (following the XDG Base Directory specifications)C:\Users\<username>\AppData\Roaming\youterm\configon Windows systems (where<username>is a placeholder for the actual user name)
Below follows a configuration template:
[api]
# YouTube Data API v3 key (can be overridden using CLI argument)
key = <api_key>
# pass entry containing the API key (if you want to use pass to store the key)
# if not set defaults to: "api/youtube"
pass_entry = <pass_entry>
[search]
# default number of search results (can be overridden using CLI argument)
# if not set defaults to: 5
results = <num>
[video]
# default video resolution (can be overridden using CLI argument)
# if not set defaults to: bestvideo
# valid options are: 144, 240, 360, 480, 720, 1080, 1440, 2160
quality = <video_resolution>
Changelog
For the complete changelog see CHANGELOG.md.
-
You can specify custom
passentries for the API key using a config file (see Configuration) ↩ -
Create entry using
pass insert api/youtubeorpass insert <entry>for custom entry (where<entry>is a placeholder for the actual entry name) ↩ -
Not recommended ↩
-
inifile structure ↩
Metadata
Release files for youterm 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| youterm-0.2.0.tar.gz | 20.4 kB | Without provenance | Details for youterm-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| youterm-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for youterm-0.2.0-py3-none-any.whl |
Total release size: 42.5 kB
Release files / youterm-0.2.0.tar.gz
| Download URL | youterm-0.2.0.tar.gz |
|---|---|
| Size | 20.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
faec1cdef62a7ea16200232f3b6f8e4e3e2eae44b21575d4d9ce22f47012c34b
|
|
BLAKE2b-256 checksum How to use checksums |
f06149a0db4d16eb2c68875d72c72e682db0832e18d4d53b0d884b25c6fe0712
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.4
|
Release files / youterm-0.2.0-py3-none-any.whl
| Download URL | youterm-0.2.0-py3-none-any.whl |
|---|---|
| Size | 22.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
103a683108366d7791b945a4423c194d6d6e5777f1426a8751b0adbd6b7e8585
|
|
BLAKE2b-256 checksum How to use checksums |
19ff0381b92cfb099ff5179b579420add0d3f3a553c53ae7349f152fc89170dd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.6.0 importlib_metadata/4.8.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.64.0 CPython/3.10.4
|
Security for youterm 0.2.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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.