sphinx-runpython: run python code in sphinx
===========================================
.. image:: https://dev.azure.com/xavierdupre3/sphinx-runpython/_apis/build/status/sdpython.sphinx-runpython
:target: https://dev.azure.com/xavierdupre3/sphinx-runpython/
.. image:: https://badge.fury.io/py/sphinx-runpython.svg
:target: http://badge.fury.io/py/sphinx-runpython
.. image:: http://img.shields.io/github/issues/sdpython/sphinx-runpython.png
:alt: GitHub Issues
:target: https://github.com/sdpython/sphinx-runpython/issues
.. image:: https://img.shields.io/badge/license-MIT-blue.svg
:alt: MIT License
:target: https://opensource.org/license/MIT/
.. image:: https://img.shields.io/github/repo-size/sdpython/sphinx-runpython
:target: https://github.com/sdpython/sphinx-runpython/
:alt: size
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
:target: https://github.com/psf/black
.. image:: https://codecov.io/github/sdpython/sphinx-runpython/branch/main/graph/badge.svg?token=CTUV6EDBB6
:target: https://codecov.io/github/sdpython/sphinx-runpython
**sphinx-runpython** implements sphinx extensions including one
to execute code and add the output to the documentation.
The library is released on
`pypi/sphinx-runpython <https://pypi.org/project/sphinx-runpython/>`_
and its documentation is published at
`sphinx-runpython
<https://sdpython.github.io/doc/sphinx-runpython/dev/>`_.
epkg
++++
It implements a list of recurring urls in documentation.
**conf.py**
::
epkg_dictionary = {'title': 'url' }
**rst**
::
:epkg:`title` -> `title <url>`_
runpython
+++++++++
Executes code in the documentation and adds it to documentation.
::
.. runpython::
:showcode:
print("python code")
::
<<<
print("python code")
>>>
python code
List of directives
++++++++++++++++++
* `blocref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_
* `collapse <https://sdpython.github.io/doc/sphinx-runpython/dev/api/collapse.html>`_
* `docassert <https://sdpython.github.io/doc/sphinx-runpython/dev/api/docassert.html>`_
* `epkg <https://sdpython.github.io/doc/sphinx-runpython/dev/api/epkg.html>`_
* `exref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_
* `faqref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_
* `gdot <https://sdpython.github.io/doc/sphinx-runpython/dev/api/gdot.html>`_
* `mathdef <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_
* `runpython <https://sdpython.github.io/doc/sphinx-runpython/dev/api/runpython.html>`_
* `sphinx_rst_builder <https://sdpython.github.io/doc/sphinx-runpython/dev/api/rst_builder.html>`_
Raw data
{
"_id": null,
"home_page": "https://github.com/sdpython/sphinx-runpython",
"name": "sphinx-runpython",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": null,
"author": "Xavier Dupr\u00e9",
"author_email": "xavier.dupre@gmail.com",
"download_url": null,
"platform": null,
"description": "sphinx-runpython: run python code in sphinx\n===========================================\n\n.. image:: https://dev.azure.com/xavierdupre3/sphinx-runpython/_apis/build/status/sdpython.sphinx-runpython\n :target: https://dev.azure.com/xavierdupre3/sphinx-runpython/\n\n.. image:: https://badge.fury.io/py/sphinx-runpython.svg\n :target: http://badge.fury.io/py/sphinx-runpython\n\n.. image:: http://img.shields.io/github/issues/sdpython/sphinx-runpython.png\n :alt: GitHub Issues\n :target: https://github.com/sdpython/sphinx-runpython/issues\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n :alt: MIT License\n :target: https://opensource.org/license/MIT/\n\n.. image:: https://img.shields.io/github/repo-size/sdpython/sphinx-runpython\n :target: https://github.com/sdpython/sphinx-runpython/\n :alt: size\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n :target: https://github.com/psf/black\n\n.. image:: https://codecov.io/github/sdpython/sphinx-runpython/branch/main/graph/badge.svg?token=CTUV6EDBB6 \n :target: https://codecov.io/github/sdpython/sphinx-runpython\n\n**sphinx-runpython** implements sphinx extensions including one\nto execute code and add the output to the documentation.\nThe library is released on\n`pypi/sphinx-runpython <https://pypi.org/project/sphinx-runpython/>`_\nand its documentation is published at\n`sphinx-runpython\n<https://sdpython.github.io/doc/sphinx-runpython/dev/>`_.\n\nepkg\n++++\n\nIt implements a list of recurring urls in documentation.\n\n**conf.py**\n\n::\n\n epkg_dictionary = {'title': 'url' }\n\n**rst**\n\n::\n\n :epkg:`title` -> `title <url>`_\n\n\nrunpython\n+++++++++\n\nExecutes code in the documentation and adds it to documentation.\n\n::\n\n .. runpython::\n :showcode:\n\n print(\"python code\")\n\n::\n\n <<<\n\n print(\"python code\")\n\n >>>\n\n python code\n\nList of directives\n++++++++++++++++++\n\n* `blocref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_\n* `collapse <https://sdpython.github.io/doc/sphinx-runpython/dev/api/collapse.html>`_\n* `docassert <https://sdpython.github.io/doc/sphinx-runpython/dev/api/docassert.html>`_\n* `epkg <https://sdpython.github.io/doc/sphinx-runpython/dev/api/epkg.html>`_\n* `exref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_\n* `faqref <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_\n* `gdot <https://sdpython.github.io/doc/sphinx-runpython/dev/api/gdot.html>`_\n* `mathdef <https://sdpython.github.io/doc/sphinx-runpython/dev/api/blocdefs.html>`_\n* `runpython <https://sdpython.github.io/doc/sphinx-runpython/dev/api/runpython.html>`_\n* `sphinx_rst_builder <https://sdpython.github.io/doc/sphinx-runpython/dev/api/rst_builder.html>`_\n",
"bugtrack_url": null,
"license": null,
"summary": "Run python code in sphinx",
"version": "0.4.0",
"project_urls": {
"Homepage": "https://github.com/sdpython/sphinx-runpython"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "4186fcfe8d57a437151cebaff8d6d881bac13a8e788e21af771acf26596940aa",
"md5": "6d40ea34b13806924fc4bfd88bc50611",
"sha256": "fa5769e4d3ab9148989ea85925d1e3551cfea02224234f1ba6174cc52956dfa8"
},
"downloads": -1,
"filename": "sphinx_runpython-0.4.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "6d40ea34b13806924fc4bfd88bc50611",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 86995,
"upload_time": "2025-07-20T21:13:11",
"upload_time_iso_8601": "2025-07-20T21:13:11.456109Z",
"url": "https://files.pythonhosted.org/packages/41/86/fcfe8d57a437151cebaff8d6d881bac13a8e788e21af771acf26596940aa/sphinx_runpython-0.4.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-20 21:13:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "sdpython",
"github_project": "sphinx-runpython",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "sphinx",
"specs": []
}
],
"lcname": "sphinx-runpython"
}