Skip to main content

Live rich content slides in jupyter notebook

Project description

IPySlides

Create Interactive Slides in Jupyter/Voila with all kind of rich content.

Launch example Notebook Binder

Overview

0.8.6 Changelog

  • Support added for objects with methods to_html such as Altair Charts.
  • write command now can accept list/tuple of content, items are place in rows.

0.8.5 Cangelog

  • Keyboard and touchscreen navigation could be enabled using LiveSlides.enable_navigation_javascript().
  • @ls.slides(...,calculate_now=True) could be used to calculate slides in advance or just in time. Default is True.
  • You can now use ipyslides.utils.iwrite to build complex layout of widgets like ipywidgets, bqplot etc. (and text using ipyslides.utils.ihtml).

0.8.3 Changelog

If you have ls = LiveSlides():

  • You can now use ls.cite method to create citations which you can write at end by ls.write_citations command.
  • ls.insert_after no longer works, use
@ls.slides(after_slide_number,*objs)
def func(obj):
    write(obj) #etc. for each obj in objs

decorator which is more pythonic way.

Changes in Version 0.8

Note: All these points may not or only partially apply to earlier versions. So use stable API above version 8.

  • Before this version, slides were collected using global namespace, which only allowed one presentation per notebook. Now slides are stored in local namespace, so no restriction on number of slides per notebook.
  • To acheive local namespace, functions are moved under class LiveSlide and it registers magics too. So now you will be able to use %%slide, %%title magics. Now you will use context managers as follows
ls = LiveSlides()
ls.convert2slides(True)

with ls.title():
    ...
with ls.slide(<slide number>):
    ...
ls.insert_after(<slide number>,*objs, func)
  • ipyslides.initialize() can write all above code in same cell.

Note: For LiveSlides('A'), use %%slideA, %%titleA, LiveSlides('B'), use %%slideB, %%titleB so that they do not overwite each other's slides.

  • You can elevate simple cell output to fullscreen in Jupyterlab >= 3.

  • with ls.slide content manager is equivalent to %%slide so make sure none of them overwrite each other.

  • Auto refresh is enabled. Whenever you execute a cell containing %%title, with ls.title, %%slide, with ls.slide or ls.insert_after, slides get updated automatically.

  • LiveSlides should be only in top cell. As it collects slides in local namespace, it can not take into account the slides created above itself.

Install

> pip install ipyslides>=0.8

For development install, clone this repository and then

> cd ipyslides
> pip install -e .

Editable Demo

See a Demo Notebook at Kaggle. You can edit it yourself.

For jupyterlab >= 3, do pip install sidecar for better presenting mode.

Content Types to Embed

You can embed anything that you can include in Jupyter notebook like ipywidgets,HTML,PDF,Videos etc.,including jupyter notebook itself!

Note: Websites may refuse to load in iframe. Note: You can embed one intsnace of slides ls1' inside other instance ls2' using ls2.insert_after(<N>,ls1.box). This is very cool.

Full Screen Presentation

  • Jupyterlab 3.0+ has full screen eneabled from any view:

    • Direct output of cell can be turned into fullscreen.
    • Linked output view using Create New Output View command is very useful, so you can edit and see output right there.
    • If you have installed Jupyterlab-Sidecar, slides automatically open in it.
  • Use Voila for full screen prsentations. Your notebook remains same, it is just get run by Voila, may not work as expected.

  • Slides in Jupyter Lab are theme aware in Inherit theme mode, so theme of slides changes based on editor theme.

Very thankful to Python-Markdown which enabled to create write command as well as syntax highliting.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ipyslides-0.8.6.tar.gz (21.8 kB view details)

Uploaded Source

Built Distribution

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

ipyslides-0.8.6-py3-none-any.whl (22.5 kB view details)

Uploaded Python 3

File details

Details for the file ipyslides-0.8.6.tar.gz.

File metadata

  • Download URL: ipyslides-0.8.6.tar.gz
  • Upload date:
  • Size: 21.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for ipyslides-0.8.6.tar.gz
Algorithm Hash digest
SHA256 e0499c36c243ee9dea48c69f1cba2b8425011ed6caaf326ccb17740db2432635
MD5 2a7042f42c0d2f1d924170b7af0fe796
BLAKE2b-256 8353ce718d2fd1eca52f857bd9cba56f9ebc2baf734b844ee54b5ed264426e1e

See more details on using hashes here.

File details

Details for the file ipyslides-0.8.6-py3-none-any.whl.

File metadata

  • Download URL: ipyslides-0.8.6-py3-none-any.whl
  • Upload date:
  • Size: 22.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.24.0 setuptools/57.4.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.6

File hashes

Hashes for ipyslides-0.8.6-py3-none-any.whl
Algorithm Hash digest
SHA256 8aa1064e14ba0bdb334f7a4682849d370f342dba95f5d586d6f1d6becb4f2a8b
MD5 2008bcf69d500952ab84d9508ed1837f
BLAKE2b-256 6ec01f853c1e176d87e09e5e81b7bb73c04463165ddd98f62d78e2321cee73df

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