slideception
A Python library for creating interactive presentations in Linux terminals.
Requirements
- Python 3.8 or newer
- Linux (unless you avoid the Linux-specific stuff)
Usage
Here's a quick example:
#!/usr/bin/env python3
from slideception import display_slides, ipython, slide
@slide
def context_managers():
"""Context Managers
A **context manager** is a thing that can be used in a `with` block.
```python3
with record_time() as timer:
stuff()
print(f"stuff took {timer.elapsed} seconds")
```
It lets you factor out pieces of code that *surround* other code.
"""
# Now jump into an intepreter for a quick demo
ipython()
display_slides()
Presentation Boilerplate
At a minimum, you'll need to import display_slides and slide and call
display_slides() at the bottom of your script.
#!/usr/bin/env python3
from slideception import display_slides, slide
…
display_slides()
Defining Slides
@slide
This decorator registers a function as a slide. The docstring of the function becomes the slide's content, and the body of the function is executed after the content is displayed. The docstring is parsed as CommonMark and then rendered for display in a terminal.
Helpers
-
bash(history=None, init=None)
This function starts a Bash shell which can be used to demo shell scripting and command-line programs.
The
historyparameter accepts a list of commands which will be preloaded into the shell's history; this lets you simply press Up to recall those commands instead of typing them from scratch.The
initparameter accepts a list of commands which will be executed after the shell loads your.bashrcfile. This can be used tocdto a specific directory, create files, etc. -
ipython()
This function starts an iPython interpreter which can be used to demo Python code.
-
python()
This function starts a Python interpreter which can be used to demo Python code. You should definitely prefer to use
ipython()if possible.
Metadata
Release files for slideception 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| slideception-0.1.0.tar.gz | 4.5 kB | Without provenance | Details for slideception-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| slideception-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for slideception-0.1.0-py3-none-any.whl |
Total release size: 9.8 kB
Release files / slideception-0.1.0.tar.gz
| Download URL | slideception-0.1.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d4083245abd03a5f53493870862b59f0a327a06fb24622f82714bd5c15b68980
|
|
BLAKE2b-256 checksum How to use checksums |
a0aaf12fbbe3f28e8a1737c758448d3fe455058484dd4c35e4dd89c4591a3532
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
|
Release files / slideception-0.1.0-py3-none-any.whl
| Download URL | slideception-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1a4d08c16643d45c096aa8e1fb6d0790da6e69593a5ee3c776f9fe47d1233e1f
|
|
BLAKE2b-256 checksum How to use checksums |
48855443a359aff115ba2f2ca35931a0a239e170b73683646b8bd0735c4c2c1d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2 requests-toolbelt/0.9.1 tqdm/4.40.0 CPython/3.8.0
|
Security for slideception 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.