https://github.com/parafoxia/vidyo
A simple way to get information on YouTube videos.
https://github.com/parafoxia/vidyo
Last synced: 11 months ago
JSON representation
A simple way to get information on YouTube videos.
- Host: GitHub
- URL: https://github.com/parafoxia/vidyo
- Owner: parafoxia
- License: bsd-3-clause
- Created: 2021-07-05T17:37:46.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2021-07-23T16:07:24.000Z (over 4 years ago)
- Last Synced: 2025-01-28T04:24:28.010Z (about 1 year ago)
- Language: Python
- Homepage: https://vidyo.readthedocs.io/en/latest/index.html
- Size: 24.4 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# vidyo
[](https://pypi.python.org/pypi/vidyo/) [](https://pypi.python.org/pypi/vidyo/) [](https://github.com/parafoxia/vidyo/blob/main/LICENSE) [](https://vidyo.readthedocs.io/en/latest/?badge=latest)
A simple way to get information on YouTube videos.
## Features
- Pythonic syntax lets you feel right at home
- Lightweight nature means you don't have to worry about excessive dependencies
- Simple to use objects take the hassle out of API inconsistencies
## Installation
**You need Python 3.7.0 or greater to run vidyo.** You will also need to have a Google Developers project with the YouTube Data API enabled. You can find instructions on how to do that in the [documentation](https://vidyo.readthedocs.io/en/latest/starting/google-dev.html).
It is recommended you install vidyo in a virtual environment. To do this, run the following:
```bash
# Windows
> py -3.9 -m venv .venv
> .venv\Scripts\activate
> pip install vidyo
# Linux\macOS
$ python3.9 -m venv .venv
$ source ./.venv/bin/activate
$ pip install vidyo
```
To install vidyo outside of a virtual environment instead, run the following:
```bash
# Windows
> py -3.9 -m pip install vidyo
# Linux/macOS
$ python3.9 -m pip install vidyo
```
You can also install the development version by running the following (this assumes you're on Linux/macOS):
```bash
$ git clone https://github.com/parafoxia/vidyo
$ cd vidyo
$ git checkout develop # Any valid branch name can go here.
$ python3.9 -m pip install -U .
```
## Usage examples
The following example shows you how display the title and number of views of the first YouTube video and then download its thumbnail.
```py
from vidyo import Client
# Load your API key from a file.
with open("secrets/api-key") as f:
key = f.read()
client = Client(key)
video = client.get_video("jNQXAC9IVRw")
print(f"{video.title} has {video.views:,} views.")
video.get_thumbnail().save("thumbnail.jpg")
```
## License
The vidyo module for Python is licensed under the [BSD-3-Clause License](https://github.com/parafoxia/vidyo/blob/main/LICENSE).