runthis-sphinxext
This provides a sphinx extension that adds RunThis code blocks, which display a highligthed code-block statically, but with a "RunThis" button above them. When the button is clicked, the code block is replaced by a terminal session that has executed that code.
Installation
RunThis Sphinx Extention may be installed with either conda or pip:
# use the conda-forge channel
$ conda install -c conda-forge runthis-sphinxext
# Or you can use Pip, if you must.
$ pip install runthis-sphinxext
Configuration
To use the RunThis code blocks, you must configure sphinx to know about
RunThis. First, make sure the sphinx extension is registered. In the
conf.py, add runthis.sphinxext somewhere in the extensions block:
extensions = [
...
"runthis.sphinxext",
...
]
After this, you also need to tell sphinx where the RunThis Server is
located. This can be set with the runthis_server variable anywhere
in the conf.py. For example:
# runthis options
runthis_server = "http://localhost:5000"
Usage
To use the RunThis directive is very similar to the code-block
directive in rST. In any of your *.rst files, you may use
the runthis directive, followed by the language name on the
same line. After any code-block options and one or more blank lines,
the code that you wish to display and run, is in an indented block.
For example:
.. runthis:: python
import sys
print(sys.executable)
This will be run on the remote server specified in the conf.py file.
Metadata
Release files for runthis-sphinxext 0.0.3
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 |
|---|---|---|---|---|
| runthis-sphinxext-0.0.3.tar.gz | 32.2 kB | Without provenance | Details for runthis-sphinxext-0.0.3.tar.gz |
Release files / runthis-sphinxext-0.0.3.tar.gz
| Download URL | runthis-sphinxext-0.0.3.tar.gz |
|---|---|
| Size | 32.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
09be98d6bf9b16954bd3a3c6bffcddbb7ae472bd1edd656138a47f1109df4eb7
|
|
BLAKE2b-256 checksum How to use checksums |
088dcf226d2a2c7d374c214419de4daecb99ad75569118de7fec07c88cf57d4e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0.post20200311 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.6
|
Security for runthis-sphinxext 0.0.3
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.