Metadata-Version: 2.4
Name: includepy
Version: 0.2
Summary: Include Python source code in Markdown files
Project-URL: Source, https://github.com/robmoss/includepy
Project-URL: Documentation, https://includepy.readthedocs.io/
Project-URL: Homepage, https://includepy.readthedocs.io/
Project-URL: Changelog, https://includepy.readthedocs.io/en/latest/changelog/
Author-email: Rob Moss <rgmoss@unimelb.edu.au>
Maintainer-email: Rob Moss <rgmoss@unimelb.edu.au>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Web Environment
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Documentation
Classifier: Topic :: Software Development :: Documentation
Classifier: Topic :: Text Processing :: Markup :: HTML
Classifier: Topic :: Text Processing :: Markup :: Markdown
Requires-Python: >=3.10
Requires-Dist: markdown>=3.6
Provides-Extra: docs
Requires-Dist: mkdocstrings-python>=2.0.3; extra == 'docs'
Requires-Dist: zensical>=0.0.23; extra == 'docs'
Provides-Extra: tests
Requires-Dist: pytest-cov>=4.0; extra == 'tests'
Requires-Dist: pytest>=8.1.1; extra == 'tests'
Description-Content-Type: text/markdown

# Include Python source code in Markdown files

[![Latest version](https://badge.fury.io/py/includepy.svg)](https://pypi.org/project/includepy/)
[![Documentation](https://readthedocs.org/projects/includepy/badge/)](https://includepy.readthedocs.io/)
[![MIT license](https://img.shields.io/badge/License-MIT-blue.svg)](https://en.wikipedia.org/wiki/MIT_License)

The `includepy` package provides a Markdown preprocessor that allows you to include the source code for a specific Python object (e.g., a function or class) when rendering Markdown content.

For example, to include the source code for the `factorial` function in [`example.py`](example.py), add the following lines in a code block:

```py
-->includepy<-- example.py
-->pyobject<-- factorial
```

The `includepy` preprocessor will turn this into the following:

```py
def factorial(n: int) -> int:
    value = n  # (1)
    while n > 1:
        n -= 1
        value *= n
    return value
```

See the [documentation](https://includepy.readthedocs.io/) for further details.
