API client for Piped: https://github.com/TeamPiped/Piped Forked to allow for Search Queries
Find a file
2024-01-16 04:58:07 -05:00
.github/workflows Do not test 2022-03-26 19:24:06 +01:00
piped_api make search results filter configurable 2024-01-16 04:56:39 -05:00
scripts Comments 2022-02-26 10:35:58 +01:00
tests Some tweaks 2022-02-28 09:24:59 +01:00
.gitignore Comments 2022-02-26 10:35:58 +01:00
LICENSE Initial commit 2022-01-23 11:14:52 +01:00
README.md update README 2024-01-16 04:58:07 -05:00
requirements.txt Comments 2022-02-26 10:35:58 +01:00
setup.py Bump version 2022-03-26 19:25:06 +01:00

Piped API client (Python)

A Python API wrapper for Piped. This can essentially be used as an alternative way to access YouTube's API, without needing to use an API key. Forked to allow for search queries to be made.

Installation

pip install git+https://gitdab.com/cere/python-piped-api-client

Quickstart

Getting started is very easy:

from piped_api import PipedClient

CLIENT = PipedClient()


# Print out the first audio stream URL for a video:
video = CLIENT.get_video(video_id)
audio_stream = video.get_streams('audio')[0]

print(f"Audio stream URL: {audio_stream.url} ({audio_stream.mime_type})")

You can find more examples in the tests folder.

Why?

The creation of this package was primarily fueled by the same type of motivation Piped has.

Google's API is not very easy-to-use - you must obtain some JSON thingy to use it, and it is very low-level and not very user-friendly. On the other hand, this package accessed the Piped API, which has a much more high-level API and doesn't need an account or API keys.

It is not meant to be a replacement for the official YouTube API, but it can help you to cut the strings that Google attaches to you when using their API.