You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
Josh Karpel 088e419d6b
Pin to Textual v0.4.0 (#157)
2 years ago
.github fix GHCR login (#156) 2 years ago
docker Drop Python 3.9, remove unused docs and perf tests (#129) 2 years ago
screenshots Pin to Textual v0.4.0 (#157) 2 years ago
spiel Pin to Textual v0.4.0 (#157) 2 years ago
tests Switch to Textual (#154) 2 years ago
.coveragerc Add a `Plot` widget (#33) 3 years ago
.dockerignore make a Docker image and publish to GHCR (#15) 3 years ago
.gitignore Optimizations for `Image` and `Plot` (#37) 3 years ago
.pre-commit-config.yaml Switch to Textual (#154) 2 years ago
CHANGELOG.md Pin to Textual v0.4.0 (#157) 2 years ago
LICENSE Initial commit 3 years ago
README.md Pin to Textual v0.4.0 (#157) 2 years ago
codecov.yml Set up infrastructure (#1) 3 years ago
poetry.lock Pin to Textual v0.4.0 (#157) 2 years ago
pyproject.toml Pin to Textual v0.4.0 (#157) 2 years ago

README.md

Spiel

PyPI Documentation Status PyPI - License

pre-commit.ci status codecov Code style: black

GitHub issues GitHub pull requests

Spiel is a framework for building and presenting richly-styled presentations in your terminal using Python.

To see what Spiel can do without installing it, you can view the demonstration deck in a container:

$ docker run -it --rm ghcr.io/joshkarpel/spiel

Alternatively, install Spiel (pip install spiel) and run this command to view the demonstration deck:

$ spiel demo present

The first slide of the demo deck The demo deck in "deck view"

Sandboxed Execution via Containers

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/deck.py, you could do

$ docker run -it --rm --mount type=bind,source=$PWD/presentation,target=/presentation ghcr.io/joshkarpel/spiel spiel present /presentation/deck.py

If the presentation has extra dependencies (like other Python packages), we recommend building a new image that inherits our image (e.g., FROM ghcr.io/joshkarpel/spiel:vX.Y.Z). Spiel's image itself inherits from the Python base image.

Supported Systems

Spiel currently relies on underlying terminal mechanisms that are only available on POSIX systems (e.g., Linux and MacOS). If you're on Windows, you can use the Windows Subsystem for Linux to run Spiel.