Pdoc
pdoc.dev › docs › pdoc.html
pdoc API documentation
We can invoke pdoc to take our ... see: If you look closely, you'll notice that docstrings are interpreted as Markdown. For example, `pdoc` is rendered as pdoc. Additionally, identifiers such as the type annotation for Dog.friends are automatically linked...
Factsheet
Original author Andrew Gallant
Developer Mitmproxy Project
Release August 9, 2013; 13 years ago
Original author Andrew Gallant
Developer Mitmproxy Project
Release August 9, 2013; 13 years ago
Pdoc
pdoc.dev
pdoc – Generate API Documentation for Python Projects
pdoc - """ A small `pdoc` example. A lightweight alternative to Sphinx!
Pdoc3
pdoc3.github.io › pdoc › doc › pdoc
pdoc API documentation
This can be fine-tuned through __pdoc__ dict. In Python, objects like modules, functions, classes, and methods have a special attribute __doc__ which contains that object's documentation string (docstring). For example, the following code defines a function with a docstring and shows how to ...
Pdoc3
pdoc3.github.io › pdoc › doc › pdoc › test › example_pkg
pdoc.test.example_pkg API documentation
Examples in doctest format. ... def numpy(self): """ Summary line. **Documentation**: https://pdoc3.github.io/pdoc/doc/pdoc/ **Source Code**: https://github.com/pdoc3/ Parameters ---------- x1, x2 : array_like Input arrays, description of `x1`, `x2`. .. versionadded:: 1.5.0 x : { NoneType, ...
Snyk
snyk.io › advisor › pdoc › pdoc code examples
Top 5 pdoc Code Examples | Snyk
def generate_module_docs(modules, docs_path, real_base_path, toc): for module_name in modules: module = Module.from_module_name(module_name, real_base_path) pdoc_module = pdoc.Module(pdoc.import_module(module_name), allsubmodules=True) for c in pdoc_module.classes(): generate_class_docs(pdoc_module, c, docs_path, toc) module_path = (module_name.replace('.', '/') .replace('__init__', 'index')) module_docs_path = os.path.join(docs_path, module_path) + '.json' if pdoc_module.functions(): toc_key = module_name.replace('google.cloud.', '').split('.')[0] toc_entry = build_toc_entry(module.name, module_path) toc['services'][toc_key].append(toc_entry) write_docs_file(module_docs_path, json.dumps(module.to_dict(), indent=2, sort_keys=True))
GitHub
github.com › pdoc3 › pdoc › blob › master › pdoc › documentation.md
pdoc/pdoc/documentation.md at master · pdoc3/pdoc
pdoc includes a feature-rich "binary" program for producing HTML and plain text documentation of your modules. For example, to produce HTML documentation of your whole package in subdirectory 'build' of the current directory, using the default HTML template, run:
Author: pdoc3
GitHub
github.com › mitmproxy › pdoc › blob › main › examples › custom-template › module.html.jinja2
pdoc/examples/custom-template/module.html.jinja2 at main · mitmproxy/pdoc
February 10, 2022 - For example, if the `--favicon` option does not do what you want, you can specify a replacement like this. ... <link rel="icon" type="image/svg+xml" href="data:image/svg+xml,{% filter urlencode %}{% include "resources/pdoc-logo.svg" %}{% endfilter %}"/>
Author: mitmproxy
Equalapriori
equalapriori.github.io › minimal_doc › pdoc3
pdoc3 - Documentation tutorials
pdoc3 is a really simple documentation generator and viewer with minimal setup. It is great, example for browsing code that you haven't fully set up documentation for yet, although it also can generate functional web pages that you can host if the project is not too extensive.
Pdoc3
pdoc3.github.io › pdoc
pdoc – Auto-generate API documentation for Python projects
Enter pdoc, the perfect documentation generator for small-to-medium-sized, tidy Python projects. It generates documentation simply from your project's already-existing public modules' and objects' docstrings, like sphinx-apidoc or sphinx.ext.autodoc, but without the hassle of these tools.
SciVision
scivision.dev › pdoc-python-quickstart
Pdoc Python quickstart | Scientific Computing
December 3, 2020 - At this time, pdoc3 doesn’t consider Python type hinting. ... We use the pymap3d project with auto-generated docs as an example.
Top answer 1 of 2
3
This is where I've got so far:
def make_pdoc():
import pdoc
import sys
from os import path, makedirs
libpath = 'C:\\path\\to\\file\\'
if path.exists(libpath):
sys.path.append(libpath)
pdoc.import_path.append(libpath)
mod = pdoc.import_module('package-name-here')
doc = pdoc.Module(mod, allsubmodules=True)
string = doc.html(external_links=True)
# Package level
with open(doc.name + '/_doc/index.html', 'w') as html_file:
html_file.write(string.encode('utf-8'))
# Sublevel 1
for submodule in doc.submodules():
string = submodule.html(external_links=True)
if submodule.is_package():
exte = '/index.html'
else:
exte = '.m.html'
dpath = (submodule.name.split('.')[0] + '/_doc/' +
submodule.name.split('.')[-1]) + '/'
if not path.exists(dpath):
makedirs(dpath)
with open(dpath + exte, 'w') as html_file:
html_file.write(string.encode('utf-8'))
# Sublevel 2
if submodule.submodules():
for subsubmodule in submodule.submodules():
print subsubmodule.name
string = subsubmodule.html(external_links=True)
if subsubmodule.is_package():
exte = '.html'
else:
exte = '.m.html'
with open(subsubmodule.name.split('.')[0] + '/_doc/' +
subsubmodule.name.split('.')[1] + '/' +
subsubmodule.name.split('.')[-1] +
exte, 'w') as html_file:
html_file.write(string.encode('utf-8'))
if __name__ == '__main__':
make_pdoc()
This code creates directories in html pages according to tree structure in source package.
2 of 2
0
With the latest version of pdoc3 0.5.0, you can follow the example from documentation:
import pdoc
files = ['a.py', './b/'] # Can be modules or paths
modules = [pdoc.Module(mod) for mod in files]
pdoc.link_inheritance()
def recursive_htmls(mod):
yield mod.name, mod.html()
for submod in mod.submodules():
yield from recursive_htmls(submod)
for mod in modules:
for module_name, html in recursive_htmls(mod):
... # Save html to file