Skip to main content

Turn YouTube URLs into embedded players in Datasette

Project description

datasette-youtube-embed

PyPI Changelog Tests License

Turn YouTube URLs into embedded players in Datasette

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-youtube-embed

Usage

Once installed, any columns containing URLs that look like one of these:

  • https://www.youtube.com/watch?v=xyz
  • https://www.youtube.com/watch?v=xyz&start=30
  • https://www.youtube.com/watch?v=xyz&start=30&end=50

Will be turned into YouTube embeds like this:

<lite-youtube videoid="xyz" params="start=30" style="min-width: 200px"></lite-youtube>

These will then be rendered using Lite YouTube Embed, which avoids loading the full YouTube embed until someone interacts with it.

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-youtube-embed
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

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

datasette_youtube_embed-0.2.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

datasette_youtube_embed-0.2-py3-none-any.whl (8.8 kB view details)

Uploaded Python 3

File details

Details for the file datasette_youtube_embed-0.2.tar.gz.

File metadata

  • Download URL: datasette_youtube_embed-0.2.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for datasette_youtube_embed-0.2.tar.gz
Algorithm Hash digest
SHA256 2c61a233fba79504998be7d6e1189122f222e36fc929370b2e0221c38c0f4a55
MD5 1d84382a08bc5d37267896de6b3faf8f
BLAKE2b-256 7ed464534924611e2a79babd560fae12ea7b0036075604a10da8fd6773cecb8e

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_youtube_embed-0.2.tar.gz:

Publisher: publish.yml on simonw/datasette-youtube-embed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file datasette_youtube_embed-0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for datasette_youtube_embed-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 a3f0aac8033850bed23b5863b3a6f5129437d616f8d827a9dc17cb0e31b5ad95
MD5 250545b1b6c2e105586bb30d45bc2f81
BLAKE2b-256 48ace9885958bd83c46f5bec6e7b621fc3d0946d12bced7dd6f52ced5b098c06

See more details on using hashes here.

Provenance

The following attestation bundles were made for datasette_youtube_embed-0.2-py3-none-any.whl:

Publisher: publish.yml on simonw/datasette-youtube-embed

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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