Create Python API documentation in Markdown format.

Overview

Python versions Pypi version Build status Docs status

Pydoc-Markdown

Pydoc-Markdown is a tool and library to create Python API documentation in Markdown format based on lib2to3, allowing it to parse your Python code without executing it.

Pydoc-Markdown requires Python 3.7 or newer, however the code that you want to generate API documentation for can be for any Python version.

>> Go to the Documentation

Features

  • Understands multiple doc styles (Sphinx, Google, Pydoc-Markdown)
  • Supports assignment docstrings (#: block before or string literal after the statement)
  • Links references to other documented API objects [WIP]
  • MkDocs, Hugo and Docusaurus integration

Installation

Install Pydoc-Markdown from PyPI:

$ pipx install 'pydoc-markdown>=4.0.0,<5.0.0'

Quickstart (MkDocs)

$ pipx install mkdocs
$ pydoc-markdown --bootstrap mkdocs
$ pydoc-markdown --bootstrap readthedocs
$ pydoc-markdown --server --open

What this does:

  1. Install MkDocs
  2. Create a pydoc-markdown.yml file in the current directory
  3. Create files to render your documentation on readthedocs.org
  4. Render Markdown files from the Python modules/packages in your current working directory and run MkDocs to open a live-preview of the page.

Quickstart (Hugo)

$ pydoc-markdown --bootstrap hugo
$ pydoc-markdown --server --open

What this does:

  1. Create a pydoc-markdown.yml file in the current directory
  2. Render Markdown files from the Python modules/packages in your current working directory and run Hugo to open a live-preview of the page. If Hugo is not available on your system, it will be downloaded automatically.

Contributing to Pydoc-Markdown

All contributions are welcome! Check out the Contributing guidelines.

Questions / Need help?

Feel free to open a topic on GitHub Discussions!


Copyright © 2021 Niklas Rosenstein

Comments
  • Convert sphinx syntax to Markdown

    Convert sphinx syntax to Markdown

    It would be nice if Sphinx (reStructure Text) syntax could be converted sot that :meth:func_name``would be displayed as code. It must not necessarily link to the function, but it would be nice to have. Also, the:param name: text...and:raise ExceptionName: text.. etc. should be handled.

    Also, some use this kind of syntax:

    Args:
        filename (str): The filename ...
    Returns:
        str: The new filename ...
    Raises:
        TypeError: Foo ...
    
    feature request 
    opened by NiklasRosenstein 20
  • [Bug] MardownRenderer disabling all class_prefix break the TOC

    [Bug] MardownRenderer disabling all class_prefix break the TOC

    Hi,

    I have an issue when disabling both add_method_class_prefix & add_member_class_prefix in the MarkdownRenderer, it breaks the TOC, that still looks for the fully qualified name (with the class prefix). Is this a known bug or a misconfiguration on my end?

    Also is there a way to remove the prefix in the top module? (for instance in the screenshot instead of mtb.blender.mgl I want mgl)

    image

    Thanks

    bug docs 
    opened by melMass 16
  • No errors, but also no content

    No errors, but also no content

    I'm running pydoc-markdown 3.1.1 with the following config:

    loaders:
        - type: python
    processors:
        - type: filter
        - type: smart
        - type: crossref
    renderer:
        type: mkdocs
        site_name: Cape-Python-API
        content_directory_name: docs
        output_directory: ../pythonv1
        pages:
        - title: cape_privacy
          source: 'README.md'
        - title: cape_privacy.pandas
          contents:
          - cape_privacy.pandas._init_.py
          children:
          - title: pandas.registry
          contents:
          - cape_privacy.pandas.registry.py
    

    There are no errors, and there is some output: I get all the files I'd expect:

    image

    The README content is correctly picked up and copied over. When I run mkdocs serve, it displays. The other pages exist, and can be reached via the menu, but they are blank.

    I'm not totally sure how much of the code would be picked up - it's possible _init_.py doesn't have the right contents. But cape_privacy.pandas.registry.py definitely contains docstrings that I would expect to see (and they appear fine with other tools such as pdoc)

    The following is one part of the registry.py file:

    def get(transformation: str) -> TransformationCtor:
        """Returns the constructor for the given key.
    
        Arguments:
            transformation: The key of transformation to retrieve.
        """
        return _registry.get(transformation, None)
    

    Any idea why nothing is showing up?

    bug question 
    opened by StarfallProjects 13
  • Bad import from 'nr.types'

    Bad import from 'nr.types'

    Hi,

    I just installed the @develop version (because main release does not work with my project)

    When I try to do a pydoc-markdown --modules debug --search-path src/ > docs.md (debug is my module), I got this error :

    Traceback (most recent call last): File "/usr/local/bin/pydoc-markdown", line 6, in from pydoc_markdown.main import _entry_point File "/usr/local/lib/python3.7/site-packages/pydoc_markdown/main.py", line 30, in from nr.types import record ImportError: cannot import name 'record' from 'nr.types' (/usr/local/lib/python3.7/site-packages/nr/types/init.py)

    I searched on nr.types : https://pypi.org/project/nr.types/ And I cannot find nr.types.record

    I'm working with Python 3.7, is this the reason of this fail ?

    Thanks !

    bug 
    opened by wibimaster 13
  • dataclasses distribution was not found

    dataclasses distribution was not found

    command-line invocation fails with the error

    pkg_resources.DistributionNotFound: The 'dataclasses<1.0.0,>=0.6.0' distribution was not found and is required by nr.parsing.date

    this is in python=3.9.6, so dataclasses should be natively available. I've also tried explicitly installing several different versions of dataclasses using conda and pip with no effect.

    upstream 
    opened by m-stclair 9
  • YapfError: invalid syntax

    YapfError: invalid syntax

    Environment

    • Pydoc-Markdown Version: v4.6.3
    • Python Version: v3.10.2
    • Operating System: Ubuntu 20.04.03 LTS (GitHub Actions)

    Describe the bug

    • working (pydoc-markdown-4.5.1 databind.core-1.5.1 mkdocs-material-8.2.3 pymdown-extensions-9.2)
    • broken (pydoc-markdown-4.6.3 databind.core-1.5.2 mkdocs-material-8.2.6 pymdown-extensions-9.3)
    • still broken (as above but replacing node.docstring => node.docstring.content)

    There's an odd config warning in all runs.

     [WARNING - pydoc_markdown.main]: Unknown configuration options:
      - $ (ObjectType(pydoc_markdown.PydocMarkdown)) [pydoc-markdown.yml]
      - .renderer (UnionType(pydoc_markdown.interfaces.Renderer))
      - $ (ObjectType(pydoc_markdown.contrib.renderers.mkdocs.MkdocsRenderer))
      - .pages (ListType(ObjectType(pydoc_markdown.util.pages.Page), python_type=Pages))
      - .7 (ObjectType(pydoc_markdown.util.pages.Page))
      - .children (ListType(ObjectType(pydoc_markdown.util.pages.Page)))
      - .0 (ObjectType(pydoc_markdown.util.pages.Page))
      - .directory (UnknownType())
    
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/pytree_utils.py", line 119, in ParseCodeToTree
        tree = parser_driver.parse_string(code, debug=False)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/driver.py", line 103, in parse_string
        return self.parse_tokens(tokens, debug)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/driver.py", line 71, in parse_tokens
        if p.addtoken(type, value, (prefix, start)):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/parse.py", line 162, in addtoken
        raise ParseError("bad input", type, value, context)
    lib2to3.pgen2.parse.ParseError: bad input: type=16, value='*', context=(' ', (2, 27))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/pytree_utils.py", line 125, in ParseCodeToTree
        tree = parser_driver.parse_string(code, debug=False)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/driver.py", line 103, in parse_string
        return self.parse_tokens(tokens, debug)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/driver.py", line 71, in parse_tokens
        if p.addtoken(type, value, (prefix, start)):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/lib2to3/pgen2/parse.py", line 162, in addtoken
        raise ParseError("bad input", type, value, context)
    lib2to3.pgen2.parse.ParseError: bad input: type=16, value='*', context=(' ', (2, 27))
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/yapf_api.py", line 183, in FormatCode
        tree = pytree_utils.ParseCodeToTree(unformatted_source)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/pytree_utils.py", line 131, in ParseCodeToTree
        raise e
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/pytree_utils.py", line 129, in ParseCodeToTree
        ast.parse(code)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/ast.py", line 50, in parse
        return compile(source, filename, mode, flags,
      File "<unknown>", line 2
        async def gather(cls, *fs, *, loop=None, timeout=None, total=None, **tqdm_kwargs): pass
                                   ^
    SyntaxError: invalid syntax
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.10.2/x64/bin/pydoc-markdown", line 8, in <module>
        sys.exit(cli())
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1128, in __call__
        return self.main(*args, **kwargs)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1053, in main
        rv = self.invoke(ctx)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 1395, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/click/core.py", line 754, in invoke
        return __callback(*args, **kwargs)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/main.py", line 344, in cli
        session.render(pydocmd)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/main.py", line 138, in render
        config.render(modules)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/__init__.py", line 179, in render
        self.renderer.render(modules)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/mkdocs.py", line 168, in render
        item.page.render(filename, modules, self.markdown, self._context.directory)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/util/pages.py", line 179, in render
        renderer.render_single_page(fp, self.filtered_modules(modules), self.title)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 443, in render_single_page
        self._render_recursive(fp, 1, m)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 368, in _render_recursive
        self._render_recursive(fp, level, member)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 368, in _render_recursive
        self._render_recursive(fp, level, member)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 365, in _render_recursive
        self._render_object(fp, level, obj)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 350, in _render_object
        self._render_signature_block(fp, obj)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 329, in _render_signature_block
        code = self._format_function_signature(obj, add_method_bar=self.signature_with_vertical_bar)
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 299, in _format_function_signature
        result = self._yapf_code(result + ': pass').rpartition(':')[0].strip()
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/pydoc_markdown/contrib/renderers/markdown.py", line 281, in _yapf_code
        return FormatCode(code, style_config=style)[0]
      File "/opt/hostedtoolcache/Python/3.10.2/x64/lib/python3.10/site-packages/yapf/yapflib/yapf_api.py", line 186, in FormatCode
        raise errors.YapfError(errors.FormatErrorMsg(e))
    yapf.yapflib.errors.YapfError: <unknown>:2:28: invalid syntax
    

    not sure if related to #246

    bug 
    opened by casperdcl 8
  • (WIP) feat: ⚡️ Add `serverURL` & `serverPort` options (for Hugo Server)

    (WIP) feat: ⚡️ Add `serverURL` & `serverPort` options (for Hugo Server)

    Hi,

    I wanted a way to use a LAN server instead of localhost, but it does not seem easily doable with configurations only. I did not find lots of info on the matter on Hugo's forums but it seems others are having the same issue.

    This PR almost works, by settings serverURL to 0.0.0.0 (outside localhost) & serverPort to 8080 (an open port on my router) I can access the doc from anywhere on the local network.

    The only issue is that all the links are pointing to localhost... But replacing localhost with the machine's IP does work. I tried to set the IP as baseURL as advised in a Hugo issue but that did not work with pydoc markdown.

    Tell me if there is an interest in making it part of the library.

    opened by melMass 8
  • improve view-source appearance

    improve view-source appearance

    From https://github.com/NiklasRosenstein/pydoc-markdown/pull/135#issuecomment-660022986

    Make [view source] link

    • [x] right-aligned
    • [x] smaller font
    • [ ] on the same visual line as the heading (https://stackoverflow.com/questions/13194692/align-h1-header-and-normal-text-in-same-line)

    Even just the first two help, e.g.:

    image

    using style="float: right; font-size: 75%;" changes to:

    image

    enhancement 
    opened by casperdcl 8
  • Problem with \ in the generated mkdocs.yml when deploying pydoc-markdown content with Netlify

    Problem with \ in the generated mkdocs.yml when deploying pydoc-markdown content with Netlify

    Hi! I have a situation where everything is working locally, both with mkdocs serve and if I do mkdocs build then locally serve the results.

    However, when I deploy to Netlify, I get 404s for all the pages generated by pydoc-markdown. A little digging showed that this is because a normal mkdocs.yml has the filepaths in the nav with / (e.g. myDir/myfile.md), but pydoc-markdown's autogenerated mkdocs.yml uses \ (e.g. myDir\myfile.md) It seems local mkdocs can handle this, but Netlify can't - it generates the following warnings:

    11:04:26 AM: INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
    11:04:26 AM:   - pythonv1/cape_privacy.pandas/dtypes.md
    
    11:04:26 AM: WARNING -  A relative path to 'pythonv1/cape_privacy.pandas\dtypes.md' is included in the 'nav' configuration, which is not found in the documentation files
    

    Manually editing the autogenerated mkdocs.yml to us / fixed this.

    I suspect this isn't entirely an issue with pydoc-markdown (I am using a combination of pydoc-markdown, Spotify's Monorepo plugin, and then building and deploying with Netlify). So I understand if you don't feel this is something you need to fix. However I thought I'd raise it as it does seem like the mkdocs.yml you generate may be non-standard, and possibly this issue will help future users.

    Versions: pydoc-markdown 3.1.1 python 3.7

    enhancement 
    opened by StarfallProjects 8
  •  AttributeError: '_Module' object has no attribute 'is_module'

    AttributeError: '_Module' object has no attribute 'is_module'

    ~~Probably a Python3.9 issue.~~ From https://github.com/tqdm/tqdm/runs/2659177454:

    $ pydoc-markdown --build --site-dir _site
    Traceback (most recent call last):
      File "/opt/hostedtoolcache/Python/3.9.5/x64/bin/pydoc-markdown", line 8, in <module>
        sys.exit(cli())
      ...
      File "/opt/hostedtoolcache/Python/3.9.5/x64/lib/python3.9/site-packages/pydoc_markdown/contrib/loaders/python.py", line 114, in <listcomp>
        [x.name for x in discovered_items if x.is_module()],
    AttributeError: '_Module' object has no attribute 'is_module'
    
    opened by casperdcl 7
  • Quick fixes sidebar

    Quick fixes sidebar

    Hi @NiklasRosenstein !

    I want to address two issues we met with the renderer I implemented, and I think that other users of the renderer would meet this issues:

    • shorten the label of the modules in the docusaurus sidebar, and use relative name instead fo full module name. Seems more natural and will avoid horizontal scrolls
    • nest the documentation of a module's __init__.py file under the right folder (it wasn't the case, an error on my end)
    • fix the rendering of the sidebar in case sidebar_top_level_label is null
    • add a new option sidebar_top_level_module_label that controls the sidebar label of the top-level module (assuming there is only one)

    I've implemented these using TDD. Let me know if that works for you 🙏

    opened by m-vdb 7
  • Current Docusaurus support?

    Current Docusaurus support?

    Hi, I stumbled upon this library while looking for a tool to add a Python API reference to our Docusaurus docs page. I read in the README that pydoc-markdown is switching to Novella for rendering, but Novella templates are only available for MkDocs and Hugo. What is the status of Docusaurus support at the moment? How difficult would it be to get pydoc-markdown to render my docs into Docusaurus? Thanks!

    opened by vvolhejn 1
  • `add_full_prefix` will also add the `__init__` path to its title

    `add_full_prefix` will also add the `__init__` path to its title

    Environment

    • Pydoc-Markdown Version: v4.6.4
    • Python Version: v3.10.5
    • Operating System: Ubuntu 22.04

    Describe the bug

    When using the MarkdownRenderer with add_full_prefix enabled, if there are functions defined in the __init__.py file, the prefix will also contain __init__.. Refer to https://github.com/NiklasRosenstein/pydoc-markdown/blob/3aa2fa94f514ee827992e4145a23e1260b5a4efd/src/pydoc_markdown/contrib/renderers/markdown.py#L47-L48

    Expected behavior

    I think __init__ should be ignored in the dotted_name function. Let's say you have a demo function in my_package/__init__.py, its title should be my_package.demo instead of my_package.__init__.demo.

    bug 
    opened by kemingy 0
  • Exception with latest version

    Exception with latest version

    Environment

    • Pydoc-Markdown Version: 4.6.4
    • Python Version: v3.7.15, v3.8.14 (pipelines for 3.9-3.11 haven't run yet but I suspect them to fail with the same as well)
    • Operating System: ubuntu 20.04 (github actions ubuntu-latest image)

    Describe the bug

    Running the tool results in

    File "/opt/hostedtoolcache/Python/3.7.15/x64/bin/pydoc-markdown", line 8, in <module>
        sys.exit(cli())
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line 1[13](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:14)0, in __call__
        return self.main(*args, **kwargs)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line 1055, in main
        rv = self.invoke(ctx)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/click/core.py", line [14](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:15)04, in invoke
        return ctx.invoke(self.callback, **ctx.params)
      File "/opt/hostedtoolcache/Python/3.7.[15](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:16)/x64/lib/python3.7/site-packages/click/core.py", line 760, in invoke
        return __callback(*args, **kwargs)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/main.py", line 370, in cli
        pydocmd = session.load()
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/main.py", line 1[16](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:17), in load
        config.load_config(self.config)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/pydoc_markdown/__init__.py", line 113, in load_config
        result = databind.json.new_mapper().deserialize(data, type(self), filename=filename, settings=[unknown_keys()])  # type: ignore[arg-type]  # noqa: E501  # Bad databind typehint
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/objectmapper.py", line 94, in deserialize
        return self.convert(Direction.deserialize, value, type_hint, filename, pos, key, annotations, settings)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/objectmapper.py", line 83, in convert
        return ctx.convert()
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 1[19](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:20), in convert
        return converter.convert(self)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 112, in convert
        return self._deserialize(ctx, ctx.type)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 72, in _deserialize
        ctx.push(flat_field.field.type, value, name, flat_field.field).convert()
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
        return converter.convert(self)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/union.py", line 64, in convert
        result = child_context.convert()
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
        return converter.convert(self)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 112, in convert
        return self._deserialize(ctx, ctx.type)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/object.py", line 72, in _deserialize
        ctx.push(flat_field.field.type, value, name, flat_field.field).convert()
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 119, in convert
        return converter.convert(self)
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/collection.py", line [29](https://github.com/priv-kweihmann/oelint-parser/actions/runs/3464057845/jobs/5785117241#step:8:30), in convert
        for idx, val in enumerate(ctx.value))
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/json/modules/collection.py", line 29, in <genexpr>
        for idx, val in enumerate(ctx.value))
      File "/opt/hostedtoolcache/Python/3.7.15/x64/lib/python3.7/site-packages/databind/core/mapper/converter.py", line 116, in convert
        raise ConverterNotFound(self.type, self.direction)
    databind.core.mapper.converter.ConverterNotFound: (ConcreteType(pydoc_markdown.util.pages.Page), <Direction.deserialize: 1>)
    

    only difference between the latest good run and the failing is

    exceptiongroup-1.0.1 > exceptiongroup-1.0.2 pydoc-markdown-4.6.3 > pydoc-markdown-4.6.4

    Expected behavior

    No exception, as the point release before worked fine

    bug 
    opened by priv-kweihmann 1
  • Uncaught exception in action

    Uncaught exception in action "mkdocs-run" - material theme / pymdownx.betterem / mkdocs-run

    Environment

    • Pydoc-Markdown Version: 4.6.3
    • Python Version: v3.9.14
    • Operating System: Ubuntu

    Describe the bug

    Following the getting started guide I get :

    ❯ novella
    Created temporary build directory /tmp/novella-u5rsn3nx
    Copy ['content'] to /tmp/novella-u5rsn3nx
    Watch /home/arthur/src/client/org/project/docs/content
    Detected Git repository URL: https://github.com/org/project
    Detected edit URI: blob/develop/docs/content
    Generating new /tmp/novella-u5rsn3nx/mkdocs.yml
    Discovered Python modules ['conf'] and packages ['tests', 'cmdb_pic_tooling'] in '/home/arthur/src/client/org/project/docs/..'.
    Load Python modules (search_path: ['/home/arthur/src/client/org/project/docs/../src', '/home/arthur/src/client/org/project/docs/..'], modules: ['conf'], packages: ['cmdb_pic_tooling'], discover: True)
    Watch /home/arthur/src/client/org/project/README.md
    Run $ mkdocs build -d /home/arthur/src/client/org/project/docs/_site
    ERROR   -  Config value: 'theme'. Error: Unrecognised theme name: 'material'. The available installed themes are: mkdocs, readthedocs 
    ERROR   -  Config value: 'markdown_extensions'. Error: Failed loading extension "pymdownx.betterem". 
    
    Aborted with 2 Configuration Errors!
    Error: Failed loading extension "pymdownx.betterem". defined at /home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/templates/mkdocs.py:102
    Traceback (most recent call last):
      File "/home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/build.py", line 152, in _run_actions
        action.execute(self)
      File "/home/arthur/.local/pipx/venvs/novella/lib/python3.10/site-packages/novella/action.py", line 151, in execute
        raise RuntimeError(f'command exited with code {self._proc.returncode}')
    RuntimeError: command exited with code 1
    
    

    Expected behavior

    For it to generate some docs ?

    bug 
    opened by arthurzenika 1
  • Keep 4.5.1 documentation available somewhere

    Keep 4.5.1 documentation available somewhere

    Is your feature request related to a problem? Please describe.

    I expect I am not the only user of pydoc-markdown who is using 4.5.1 before the major changes that came with 4.6.0 (which seem like such a big change that perhaps it should be 5.x.x?). The problem is the documentation for 4.5.1 is no longer available on readthedocs.

    Describe the solution you'd like

    Make the documentation for 4.5.1 available again (eg. on readthedocs with a notice that documentation for 4.6.0 and later is on github.io or as versioned documentation on readthedocs or on a GitHub branch).

    Describe alternatives you've considered

    I can get to the old README using the GitHub tag and the md files used to generate the documentation.

    Additional context

    Another possibility to consider is to keep 4.5.1 in a separate repo since 4.6.0+ is really a complete rewrite with what appear to be different aims rather than an incremental development.

    feature request 
    opened by mcarans 0
Markdown documentation generator from Google docstrings

mkgendocs A Python package for automatically generating documentation pages in markdown for Python source files by parsing Google style docstring. The

Davide Nunes 44 Dec 18, 2022
Documentation for the lottie file format

Lottie Documentation This repository contains both human-readable and machine-readable documentation about the Lottie format The documentation is avai

LottieFiles 25 Jan 5, 2023
API Documentation for Python Projects

API Documentation for Python Projects. Example pdoc -o ./html pdoc generates this website: pdoc.dev/docs. Installation pip install pdoc pdoc is compat

mitmproxy 1.4k Jan 7, 2023
Automated Integration Testing and Live Documentation for your API

Automated Integration Testing and Live Documentation for your API

ScanAPI 1.3k Dec 30, 2022
Swagger UI is a collection of HTML, JavaScript, and CSS assets that dynamically generate beautiful documentation from a Swagger-compliant API.

Introduction Swagger UI allows anyone — be it your development team or your end consumers — to visualize and interact with the API’s resources without

Swagger 23.2k Dec 29, 2022
Jupyter Notebooks as Markdown Documents, Julia, Python or R scripts

Have you always wished Jupyter notebooks were plain text documents? Wished you could edit them in your favorite IDE? And get clear and meaningful diff

Marc Wouts 5.7k Jan 4, 2023
Python syntax highlighted Markdown doctest.

phmdoctest 1.3.0 Introduction Python syntax highlighted Markdown doctest Command line program and Python library to test Python syntax highlighted cod

Mark Taylor 16 Aug 9, 2022
A curated list of awesome tools for Sphinx Python Documentation Generator

Awesome Sphinx (Python Documentation Generator) A curated list of awesome extra libraries, software and resources for Sphinx (Python Documentation Gen

Hyunjun Kim 831 Dec 27, 2022
Run `black` on python code blocks in documentation files

blacken-docs Run black on python code blocks in documentation files. install pip install blacken-docs usage blacken-docs provides a single executable

Anthony Sottile 460 Dec 23, 2022
sphinx builder that outputs markdown files.

sphinx-markdown-builder sphinx builder that outputs markdown files Please ★ this repo if you found it useful ★ ★ ★ If you want frontmatter support ple

Clay Risser 144 Jan 6, 2023
MkDocs plugin for setting revision date from git per markdown file

mkdocs-git-revision-date-plugin MkDocs plugin that displays the last revision date of the current page of the documentation based on Git. The revision

Terry Zhao 48 Jan 6, 2023
Rust Markdown Parsing Benchmarks

Rust Markdown Parsing Benchmarks This repo tries to assess Rust markdown parsing

Ed Page 1 Aug 24, 2022
Make posters from Markdown files.

MkPosters Create posters using Markdown. Supports icons, admonitions, and LaTeX mathematics. At the moment it is restricted to the specific layout of

Patrick Kidger 243 Dec 20, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 2, 2023
Literate-style documentation generator.

888888b. 888 Y88b 888 888 888 d88P 888 888 .d8888b .d8888b .d88b. 8888888P" 888 888 d88P" d88P" d88""88b 888 888 888

Pycco 808 Dec 27, 2022
Main repository for the Sphinx documentation builder

Sphinx Sphinx is a tool that makes it easy to create intelligent and beautiful documentation for Python projects (or other documents consisting of mul

null 5.1k Jan 4, 2023
Watch a Sphinx directory and rebuild the documentation when a change is detected. Also includes a livereload enabled web server.

sphinx-autobuild Rebuild Sphinx documentation on changes, with live-reload in the browser. Installation sphinx-autobuild is available on PyPI. It can

Executable Books 440 Jan 6, 2023
Your Project with Great Documentation.

Read Latest Documentation - Browse GitHub Code Repository The only thing worse than documentation never written, is documentation written but never di

Timothy Edmund Crosley 809 Dec 28, 2022
:blue_book: Automatic documentation from sources, for MkDocs.

mkdocstrings Automatic documentation from sources, for MkDocs. Features Python handler features Requirements Installation Quick usage Features Languag

Timothée Mazzucotelli 1.1k Dec 31, 2022