sphinx-code-include


Namesphinx-code-include JSON
Version 1.4.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_time2024-03-16 19:13:08
maintainer
docs_urlNone
authorColin Kennedy
requires_python>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*
licenseBSD-2-Clause
keywords sphinx code-include source-code source code include
VCS
bugtrack_url
requirements beautifulsoup4 six 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
=========

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": "",
    "docs_url": null,
    "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
    "maintainer_email": "",
    "keywords": "Sphinx,code-include,source-code,source code,include",
    "author": "Colin Kennedy",
    "author_email": "colinvfx@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/95/8e/06d6fb0735691e5366c514196771c9653ff6aba4c108f2ccb1a1bfa698e1/sphinx-code-include-1.4.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\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": "1.4.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": "95af4fe757168ac5ca1a1869365b2f33faa56a545036b8df20ed87180e1ec884",
                "md5": "5147a3d40e0f9d435c7c53851b3e3cdb",
                "sha256": "adf150e97f38895c11c14f52d4cd378bab1b08de9b62880ab160c7e86b8ab0c7"
            },
            "downloads": -1,
            "filename": "sphinx_code_include-1.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5147a3d40e0f9d435c7c53851b3e3cdb",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
            "size": 14614,
            "upload_time": "2024-03-16T19:13:06",
            "upload_time_iso_8601": "2024-03-16T19:13:06.539695Z",
            "url": "https://files.pythonhosted.org/packages/95/af/4fe757168ac5ca1a1869365b2f33faa56a545036b8df20ed87180e1ec884/sphinx_code_include-1.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "958e06d6fb0735691e5366c514196771c9653ff6aba4c108f2ccb1a1bfa698e1",
                "md5": "50cc7a50706d7d15d245fc0e57090430",
                "sha256": "6fb7197a7f992b870f2d4a97ce02cb6f2f62ffcaf5512cbf6e044ae6e826306b"
            },
            "downloads": -1,
            "filename": "sphinx-code-include-1.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "50cc7a50706d7d15d245fc0e57090430",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*",
            "size": 234548,
            "upload_time": "2024-03-16T19:13:08",
            "upload_time_iso_8601": "2024-03-16T19:13:08.170597Z",
            "url": "https://files.pythonhosted.org/packages/95/8e/06d6fb0735691e5366c514196771c9653ff6aba4c108f2ccb1a1bfa698e1/sphinx-code-include-1.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-03-16 19:13:08",
    "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": "six",
            "specs": [
                [
                    ">=",
                    "1.12"
                ]
            ]
        },
        {
            "name": "sphinx",
            "specs": [
                [
                    ">=",
                    "1.3"
                ]
            ]
        }
    ],
    "test_requirements": [
        {
            "name": "mock",
            "specs": []
        },
        {
            "name": "ways",
            "specs": [
                [
                    "==",
                    "0.1.0b1"
                ]
            ]
        }
    ],
    "tox": true,
    "lcname": "sphinx-code-include"
}
        
Elapsed time: 4.05972s