Skip to main content

Render websites and videos inside Jupyter notebooks

Project description

WebFrame

Tests PyPI version Python 3.7+ License: MIT

A simple Python library to embed websites and YouTube videos in Jupyter notebooks.

Why?

When working in Jupyter notebooks, I got tired of switching between browser tabs to check documentation or watch tutorials. This library lets you view websites and videos right inside your notebook cells.

Installation

pip install webframe

Or install from source:

git clone https://github.com/KartikSuryavanshi/Webframe-Package.git
cd Webframe-Package
pip install -e .

Usage

Embed a Website

from webframe import render_site

render_site("https://docs.python.org")
render_site("https://github.com", width=1200, height=800)

Embed YouTube Videos

from webframe import render_youtube_video

render_youtube_video("https://www.youtube.com/watch?v=VIDEO_ID")

# Short URLs work too
render_youtube_video("https://youtu.be/VIDEO_ID")

# Custom size and autoplay
render_youtube_video("https://youtu.be/VIDEO_ID", width=1000, height=600, autoplay=True, mute=True)

How It Works

Uses IPython's display functionality to render IFrames for websites and HTML embeds for YouTube videos. Only works in Jupyter notebooks or Google Colab.

Requirements

  • Python 3.7+
  • IPython

Testing

pytest

License

MIT

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

kartik_webframe-0.1.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kartik_webframe-0.1.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kartik_webframe-0.1.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.20

File hashes

Hashes for kartik_webframe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 37ed3bbbe32c4e63d1c4a67d44996376716683600cde1da3d51119ed7a1ebb3b
MD5 1ca49dd19fca791fd423f4786190dcaf
BLAKE2b-256 1f753cd4530e6f27e138d79bc4b8fa0afe0d97e4627a4e084332bc98617aa4b3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kartik_webframe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6083987dd9b6dde6158e1c2b5ee1ff6512c9b3b9a8c094e0a21dbc0482961645
MD5 fddde7ee268c2a5ea82db4bef611f768
BLAKE2b-256 17047ca767c9631007f70d1ace73326f32d8b4d58a504a2e02c6c75baccba419

See more details on using hashes here.

Supported by

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