sphinxcontrib-youtube
Sphinx "youtube" extension.
What it is and what it does
sphinxcontrib-youtube is a Sphinx extension that lets you embed videos from YouTube, Vimeo, and Peertube directly into reStructuredText documentation using simple directives. Instead of linking to videos externally, you can include them inline in your docs, and they render as embedded players in the final HTML output. It depends on Sphinx and requests, both widely used and stable.
You use it by adding the extension to your Sphinx conf.py, then writing directives like `.. youtube:: VIDEO_ID` in your .rst files. For Peertube, you can specify a custom instance URL. The package has been actively maintained and carries no known security vulnerabilities, making it a straightforward choice for documentation projects that want to include video content.
Use it for:
- Embed YouTube videos in Sphinx documentation to supplement written tutorials or guides.
- Include Vimeo videos in technical documentation for organizations that host content on Vimeo.
- Add Peertube videos to documentation for projects using decentralized video hosting.
- Create rich media documentation sites that combine text, code examples, and embedded video content.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds Sphinx directives to embed YouTube, Vimeo, and Peertube videos directly into reStructuredText documentation.
Yes. This is a lightweight, actively maintained Sphinx extension with low install friction, no security issues, and a permissive license. Install it if you need to embed videos in Sphinx documentation; skip it if your docs are text-only or you prefer external video links.
Install
sphinxcontrib-youtube on PyPI
pip
pip install sphinxcontrib-youtubeuv
uv add sphinxcontrib-youtubepoetry
poetry add sphinxcontrib-youtubeInstalling sphinxcontrib-youtube
Before you install
Low friction install with only Sphinx and requests as runtime dependencies. Active maintenance with a recent release and a stable codebase.
License in practice
Permissive license means you can use this in commercial and private projects without restriction.
Quickstart
pip install sphinxcontrib-youtube
In conf.py:
extensions = ['sphinxcontrib.youtube']
In your .rst file:
.. youtube:: dQw4w9WgXcQ
Verify before relying
- Whether the package supports modern Sphinx versions and any recent breaking changes in Sphinx's extension API.
- Performance characteristics when embedding many videos in a single documentation build.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — Sphinx, requests |
| Maintenance | actively maintained — 135 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 297,075/month — #7,891 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: sphinxcontrib_youtube-1.5.0-py2.py3-none-any.whl
Tags
More Utilities packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
charset-normalizerDetects and normalizes text encoding from…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
PygmentsPygments is a syntax highlighter that colorizes…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
django-embed-videoProvides Django template tags and model fields…
permissive · top 15,000 on PyPI
sphinx-plotly-directiveAdds a Sphinx directive to embed interactive…
unclear · top 15,000 on PyPI
sphinxcontrib-videoA Sphinx extension that embeds HTML5 videos…
permissive · top 15,000 on PyPI
sphinx_mdincludeSphinx extension that lets you include and…
permissive · top 15,000 on PyPI
micawberExtracts rich metadata (title, author,…
unclear · top 15,000 on PyPI
pybtex-docutilsIntegrates BibTeX citations into…
permissive · top 5,000 on PyPI
sphinxcontrib-imagesA Sphinx extension that replaces standard image…
permissive · top 15,000 on PyPI
nbsphinx-linkA Sphinx extension that lets you include…
permissive · top 15,000 on PyPI
m2r2Converts markdown files with embedded…
permissive · top 15,000 on PyPI
sphinx-jinjaA Sphinx extension that lets you embed Jinja2…
permissive · top 5,000 on PyPI