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 kartik-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.1.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.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kartik_webframe-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 e0f2c60731dfa935edbaaecaa7c052290bd6d990fc016f76fcdbea8bcae04a13
MD5 65f91ad5becd1e1b406769ce4b7163c0
BLAKE2b-256 ed6fe1178cbecadac111171a0d15a6586589adc46ca8c3161ebe41051a863715

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for kartik_webframe-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d5bd6fe9a075197224ea52f3dd4c525b3c8a0cdb1ce35918ceaa75736b0cabd7
MD5 23a26e963553042cc8365d88398efde0
BLAKE2b-256 4f29a015db0f9db5170cb24e38df03e3cb7638f5081d20d4797e3bf45f82a8e1

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