oEmbedPy is a straightforward oEmbed client specifically designed for Python developers. It supports Python 3.x and allows for easy integration of rich media content from various platforms. With its multiple endpoint discovery and CLI capabilities, accessing and utilizing rich content becomes seamless.
oEmbedPy is a powerful oEmbed client designed specifically for Python, enabling developers to easily retrieve rich media content from various online platforms. With its straightforward usage and Python 3.x compatibility, oEmbedPy simplifies the implementation of oEmbed functionality within applications.
Install oEmbedPy through PyPI to get started easily:
pip install oEmbedPy
To utilize oEmbedPy in Python applications, the following example demonstrates how to fetch content:
from oembedpy.application import Oembed
oembed = Oembed()
content = oembed.fetch("https://twitter.com/attakei")
print(content.type) # Output: rich
For those who prefer command-line usage, oEmbedPy offers a CLI that can be enhanced with Click:
# Basic command
$ oEmbed.py 'https://www.youtube.com/watch?v=Oyh8nuaLASA'
title: Yoshi ( ...
author_name: attakei
thumbnail_height: 360
thumbnail_width: 400
To receive output in JSON format, use the --format option:
$ oEmbed.py --format=json 'https://www.youtube.com/watch?v=Oyh8nuaLASA'
{"title":"Yoshi (NES - Nint ..."}
For comprehensive guidance and further features, refer to the documentation.
oEmbedPy streamlines the process of embedding content across various platforms, making it an essential tool for developers looking to enrich their applications with external media.
No comments yet.
Sign in to be the first to comment.