Skip to content

Presenting Decks

Depending on your preferred workflow, you can start a presentation in a variety of different ways.

Sandboxed Execution

Spiel presentations are live Python code: they can do anything that Python can do. You may want to run untrusted presentations (or even your own presentations) inside a container (but remember, even containers are not perfectly safe!). We produce a container image that can be run by (for example) Docker.

Presentations without extra Python dependencies might just need to be bind-mounted into the container. For example, if your demo file is at $PWD/presentation/, you could do

$ docker run -it --rm --mount type=bind,source=$PWD/presentation,target=/presentation spiel present /presentation/

If the presentation has extra dependencies (like other Python packages), we recommend building a new image that inherits our image (e.g., FROM Spiel's image itself inherits from the Python base image.

Using the spiel CLI

Installing the Spiel package provides a CLI tool called spiel. The spiel present subcommand allows you to present a deck; run spiel present --help to see the arguments and available options.

Using the present function

The present function lets you start a presentation programmatically (i.e., from a Python script).

If your deck is defined in talk/ like so:

#!/usr/bin/env python

from spiel import Deck, present

deck = Deck(...)

...  # construct your deck

if __name__ == "__main__":

You can then present the deck by running the script:

python talk/
Or by running the script as a module (you must have a talk/ file):
python -m talk.slides
Or by running the script via its shebang (after running chmod +x talk/ to mark talk/ as executable):