PLCT-Sphinx-Components
PLCT-Sphinx-Components is a project designed to enhance your e-learning content. These extensions are Sphinx-based and focuses on online learning content, making it an ideal choice for creating interactive and engaging online courses.
About the Directives
All the directives provided by PLCT-Sphinx-Components are wrappers for JavaScript-based components. These components facilitate a range of interactive features, such as asking multiple choice or fill in the blank questions, python based programming in the browser, executing SQL queries, and more. This enables the creation of engaging and interactive content within your Sphinx documentation.
PLCT-Sphinx-Components heavily relies on the Pyodide project for running Python-based code in the browser. Pyodide brings the Python runtime to the browser via WebAssembly. This allows for the execution of Python code, data analysis, visualization, and more, all directly within the browser.
Directives
mchoice Directive
The mchoice directive enables you to embed multiple-choice questions within your documentation.
.. mchoice::
:answer1: Belgrade
:answer2: Paris
:answer3: Madrid
:correct: 2
What is the capital of France?
In this example, a multiple-choice question is created with three answer options, and the correct answer is set to "Paris".
fitb Directive
The fitb directive allows you to insert fill-in-the-blank questions in your documentation.
.. fitb::
:answer: OpenAI
The GPT-3 model is developed by |blank|.
In this example, a fill-in-the-blank question is created where the answer is "OpenAI".
Note Directives
The following directives are used to add different types of notes in your documentation:
infonote Directive
The infonote directive is employed to insert an informational note, offering a way to provide supplementary context or explanations about a specific topic.
.. infonote::
This is an informational note.
suggestionnote Directive
The suggestionnote directive is utilized to include a suggestion note, allowing you to provide recommendations or advice related to the content.
.. suggestionnote::
This is a suggestion note with helpful recommendations.
learnmorenote Directive
The learnmorenote directive serves the purpose of adding a note encouraging users to explore additional information or resources for further learning.
.. learnmorenote::
Delve deeper into this topic by exploring additional resources.
technicalnote Directive
The technicalnote directive is used to incorporate a technical note, which can include details or information of a technical nature.
.. technicalnote::
This is a technical note providing in-depth technical information.
questionnote Directive
The questionnote directive enables the addition of a note specifically tailored for posing questions or prompting further consideration.
.. questionnote::
Here's a question to ponder: What are the implications of this concept?
Feel free to customize the content within the directives to suit the specific information you want to convey.
PyCode Directive
The PyCode directive is an extension designed to execute Python code directly within web browsers. We leverage web workers and service workers to provide a seamless input/output experience. This means that students can start experimenting with Python directly in their browsers, without the need to install anything. This makes the first steps much easier.
Usage
.. py-code:: unique_identifier
:packages: rich,numpy
print('Hello, PyCode!')
Optional arguments include:
packages: Specify additional Python packages and the environment will install it usingmicropip, a lightweight version ofpip. This means you can use a wide range of Python packages further enhancing the learning and experimentation possibilities.
Installation and Usage
To use the PLCT-Sphinx-Components in your Sphinx project, follow these steps:
-
Install the extension using pip:
pip install PLCT-Sphinx-Components -
Add the extension to your Sphinx project's
conf.pyfile:extensions = [ # ... other extensions ... 'plct-sphinx-components.extensions.multiple_choice', 'plct-sphinx-components.extensions.fill_in_the_blank', 'plct-sphinx-components.extensions.py_code, ]
-
Once the extension is enabled, you can start using the directives in your documentation files as demonstrated in the examples above.
About
This project is maintained by Petlja and aims to enhance the educational content creation experience using Sphinx. For more information about Petlja and its initiatives, please visit Petlja's website.
License
This project is licensed under the MIT License.
Metadata
Release files for plct-sphinx-components 0.0.5
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 |
|---|---|---|---|---|
| plct_sphinx_components-0.0.5.tar.gz | 1.1 MB | Without provenance | Details for plct_sphinx_components-0.0.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| plct_sphinx_components-0.0.5-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details for plct_sphinx_components-0.0.5-py2.py3-none-any.whl |
Total release size: 2.3 MB
Release files / plct_sphinx_components-0.0.5.tar.gz
| Download URL | plct_sphinx_components-0.0.5.tar.gz |
|---|---|
| Size | 1.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f8b8415aba74eaac66872721b4c4f9a990bb8f6938f1f6c19905691c4b2e63c
|
|
BLAKE2b-256 checksum How to use checksums |
e93685dbdf80eab4070b4d8dd45eb5a2bc584917eb24412cff206d2405dfccf2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Release files / plct_sphinx_components-0.0.5-py2.py3-none-any.whl
| Download URL | plct_sphinx_components-0.0.5-py2.py3-none-any.whl |
|---|---|
| Size | 1.2 MB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
7f6a13a4b6ad620f4e2714273a24a6ab4df8e17c8fec47e22a55b803788a0a1b
|
|
BLAKE2b-256 checksum How to use checksums |
94e96e0adbadf133a8ec0496da67dbf4a4f9cf851117c0e13362a7e4b6b5166e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.9.7
|
Security for plct-sphinx-components 0.0.5
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.