Skip to main content

A simple way to get information on YouTube videos.

Project description

vidyo

PyPi version PyPI pyversions License Documentation Status

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.

It is recommended you install vidyo in a virtual environment. To do this, run the following:

# 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:

# 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):

$ 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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vidyo-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

vidyo-0.1.0-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

Details for the file vidyo-0.1.0.tar.gz.

File metadata

  • Download URL: vidyo-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for vidyo-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e45da5b8d6d5870cf0637e07a24ed26fc631de2cd432b1c6be5483ce232a3ac7
MD5 f994abe12c87a669ad7e4778dfe2abb5
BLAKE2b-256 c8642c75058853a3cc76b9cecc125386b2f5d9b999c647bec2491fb12b28b411

See more details on using hashes here.

File details

Details for the file vidyo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: vidyo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.1 CPython/3.9.6

File hashes

Hashes for vidyo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 775c5bee53cd4c6bf5a550c92a45c591f49de8531720a7b51c7ee54f01b62d18
MD5 98f9c0680d6cf98a7ceb6eaf05419670
BLAKE2b-256 a4ec964cef848a82ec395b2d11dc103b73e5a488f63e8647e94c06f968159030

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page