sphinx-code-include


Namesphinx-code-include JSON
Version 2.0.0 PyPI version JSON
download
home_pagehttps://github.com/ColinKennedy/sphinx-code-include
SummaryInclude source code from any Sphinx project using only its import path
upload_time2025-01-09 06:09:11
maintainerNone
docs_urlNone
authorColin Kennedy
requires_python>=3.9
licenseBSD-2-Clause
keywords sphinx code-include source-code source code include
VCS
bugtrack_url
requirements beautifulsoup4 sphinx
Travis-CI
coveralls test coverage
            ========
Overview
========



sphinx-code-include is an extension for Sphinx that lets you render
source-code of any class or function directly into your Sphinx
documentation using only as string.

* Free software: BSD 2-Clause License

Example

::

    .. code-include :: :func:`os.path.join`

This code-include block renders as: (theme is sphinx_rtd_theme)

.. image :: https://user-images.githubusercontent.com/10103049/67256848-f7422380-f43d-11e9-857a-434ba7bf579f.jpg

As long as the string you've chosen is either

- is importable
- is coming from a project that has `sphinx.ext.viewcode`_ enabled

then code-include can find it and render it in your documentation.

Installation
============

::

    pip install sphinx-code-include

You can also install the in-development version with::

    pip install https://github.com/ColinKennedy/sphinx-code-include/archive/master.zip


Documentation
=============


https://sphinx-code-include.readthedocs.io/


Development
===========

To run the all tests run::

    tox

.. _sphinx.ext.viewcode: https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html


Changelog
=========

2.0.1 (2025-01-08)
------------------

* Dropped Python 2.7-3.8 support
* Added better CI + mypy


1.4.0 (2024-03-16)
------------------

* Added better CI, updated GitHub badges, various quality of life changes


1.3.0 (2024-03-14)
------------------

* Added explicit, separate GitHub workflow actions


1.2.0 (2024-03-13)
------------------

* Added Python 3.10 support
* Added initial GitHub workflow actions


1.1.2 (2023-04-22)
------------------

* Added missing ``user_agent`` information. See https://github.com/ColinKennedy/sphinx-code-include/issues/5


1.1.1 (2019-10-26)
------------------

* Fixed the requirements of the PyPI package


1.1.0 (2019-10-26)
------------------

* Added :link-to-source: and :link-to-documentation: options
* Added support for the :obj: tag (which can be used in place of :class:, :func:, or :meth:)


1.0.0 (2019-10-20)
------------------

* First release on PyPI.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ColinKennedy/sphinx-code-include",
    "name": "sphinx-code-include",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "Sphinx, code-include, source-code, source code, include",
    "author": "Colin Kennedy",
    "author_email": "colinvfx@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/a6/dc/f2303aa342411a6484bccdf7d194d9f4c0da105d79cdc1e0fe653bc01af4/sphinx_code_include-2.0.0.tar.gz",
    "platform": null,
    "description": "========\nOverview\n========\n\n\n\nsphinx-code-include is an extension for Sphinx that lets you render\nsource-code of any class or function directly into your Sphinx\ndocumentation using only as string.\n\n* Free software: BSD 2-Clause License\n\nExample\n\n::\n\n    .. code-include :: :func:`os.path.join`\n\nThis code-include block renders as: (theme is sphinx_rtd_theme)\n\n.. image :: https://user-images.githubusercontent.com/10103049/67256848-f7422380-f43d-11e9-857a-434ba7bf579f.jpg\n\nAs long as the string you've chosen is either\n\n- is importable\n- is coming from a project that has `sphinx.ext.viewcode`_ enabled\n\nthen code-include can find it and render it in your documentation.\n\nInstallation\n============\n\n::\n\n    pip install sphinx-code-include\n\nYou can also install the in-development version with::\n\n    pip install https://github.com/ColinKennedy/sphinx-code-include/archive/master.zip\n\n\nDocumentation\n=============\n\n\nhttps://sphinx-code-include.readthedocs.io/\n\n\nDevelopment\n===========\n\nTo run the all tests run::\n\n    tox\n\n.. _sphinx.ext.viewcode: https://www.sphinx-doc.org/en/master/usage/extensions/viewcode.html\n\n\nChangelog\n=========\n\n2.0.1 (2025-01-08)\n------------------\n\n* Dropped Python 2.7-3.8 support\n* Added better CI + mypy\n\n\n1.4.0 (2024-03-16)\n------------------\n\n* Added better CI, updated GitHub badges, various quality of life changes\n\n\n1.3.0 (2024-03-14)\n------------------\n\n* Added explicit, separate GitHub workflow actions\n\n\n1.2.0 (2024-03-13)\n------------------\n\n* Added Python 3.10 support\n* Added initial GitHub workflow actions\n\n\n1.1.2 (2023-04-22)\n------------------\n\n* Added missing ``user_agent`` information. See https://github.com/ColinKennedy/sphinx-code-include/issues/5\n\n\n1.1.1 (2019-10-26)\n------------------\n\n* Fixed the requirements of the PyPI package\n\n\n1.1.0 (2019-10-26)\n------------------\n\n* Added :link-to-source: and :link-to-documentation: options\n* Added support for the :obj: tag (which can be used in place of :class:, :func:, or :meth:)\n\n\n1.0.0 (2019-10-20)\n------------------\n\n* First release on PyPI.\n",
    "bugtrack_url": null,
    "license": "BSD-2-Clause",
    "summary": "Include source code from any Sphinx project using only its import path",
    "version": "2.0.0",
    "project_urls": {
        "Changelog": "https://sphinx-code-include.readthedocs.io/en/latest/changelog.html",
        "Documentation": "https://sphinx-code-include.readthedocs.io/",
        "Homepage": "https://github.com/ColinKennedy/sphinx-code-include",
        "Issue Tracker": "https://github.com/ColinKennedy/sphinx-code-include/issues"
    },
    "split_keywords": [
        "sphinx",
        " code-include",
        " source-code",
        " source code",
        " include"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9fe3140996a604ba498dad2d7c34ed3772168884f8664eb349003da424baef48",
                "md5": "821b27ddce39134ac0776e0d1edc6e32",
                "sha256": "4fce2765c8e6fa84b1f7a460412162e50a6b74e44ed7768873293fafc0c2a68c"
            },
            "downloads": -1,
            "filename": "sphinx_code_include-2.0.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "821b27ddce39134ac0776e0d1edc6e32",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=3.9",
            "size": 15308,
            "upload_time": "2025-01-09T06:09:09",
            "upload_time_iso_8601": "2025-01-09T06:09:09.016175Z",
            "url": "https://files.pythonhosted.org/packages/9f/e3/140996a604ba498dad2d7c34ed3772168884f8664eb349003da424baef48/sphinx_code_include-2.0.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a6dcf2303aa342411a6484bccdf7d194d9f4c0da105d79cdc1e0fe653bc01af4",
                "md5": "854661ab8abfdc24d22835b83c588deb",
                "sha256": "4237f0d99be746beee3c555343907f03dae737bcc7f07671968ee291c2d7b6ce"
            },
            "downloads": -1,
            "filename": "sphinx_code_include-2.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "854661ab8abfdc24d22835b83c588deb",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 235340,
            "upload_time": "2025-01-09T06:09:11",
            "upload_time_iso_8601": "2025-01-09T06:09:11.729302Z",
            "url": "https://files.pythonhosted.org/packages/a6/dc/f2303aa342411a6484bccdf7d194d9f4c0da105d79cdc1e0fe653bc01af4/sphinx_code_include-2.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-09 06:09:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ColinKennedy",
    "github_project": "sphinx-code-include",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "appveyor": true,
    "requirements": [
        {
            "name": "beautifulsoup4",
            "specs": [
                [
                    ">=",
                    "4.8"
                ]
            ]
        },
        {
            "name": "sphinx",
            "specs": [
                [
                    ">=",
                    "1.3"
                ]
            ]
        }
    ],
    "test_requirements": [
        {
            "name": "ways",
            "specs": [
                [
                    "==",
                    "0.1.0b1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "sphinx-code-include"
}
        
Elapsed time: 0.78408s