Skip to main content

What is Jinja24Doc

Jinja24Doc is lightweight documentation generator for python modules with jinja2 templates. It is part of Poor Http group tools (WSGI connector, WSGI/HTTP Server and mod_python connector). It could load modules and gets documentation for its items. No configuration is needed, only jinja2 templates. Your or from jinja2doc package.

It is more powerful pydoc, with style what you want. You can format your documentation string with some simple chars by wiki formating, which is similar to AsciiDoc. Or you can use standard reStructuredText format. Both of these markups parsers support highlighting and creating automatic links to PEP.

Documentation in few seconds

There are three tools for your usage: rst24doc, wiki24doc and jinja24doc. You can generate simple page like this with tools rst24doc and wiki24doc in one command:

# if your module use reStructuredText formating in documentation strings
~$ rst24doc -O your_module.html --embed-stylesheet your_module.py
# or if your module use wiki formating in documentation strings
~$ rst24doc -O your_module.html --embed-stylesheet your_module.py

Or you can create your own template, which import predefined templates from Jinja24doc. Your template.html could see like this:

{% set title = 'Your Module' %}
{% set api = load_module('your_module') %}
{% include '_reference.html' %}

Than call the jinja24doc tool with right parameters from path where your python module is available:

~$ jinja24doc --embed-stylesheet template.html > your_module.html

Jinja24doc as library

There are three submodules which you could interest to:

  • apidoc which contains base ApiDoc class to read python modules and create list of module items by method load_module.

  • rst which contains Rst class based on ApiDoc to parse reStructuredText __doc__ or document.

  • wiki which contains Wiki class based on ApiDoc to parse wiki formated __doc__ or document.

  • context which contains Context class based on Rst and Wiki to couple all functionality to working with jinja2 templates.

  • frontend which contains some functions to easier create command tool like rst24doc, wiki24doc and jinja24doc.

Getting Jinja24doc

Jinja24Doc needs Jinja2, docutils and distutils-tinyhtmlwriter package for build and or for install. So you must install it first.

Install from PyPI

~$ pip install jinja24doc

Develop version from git

~$ git clone https://github.com/PoorHttp/Jinja24Doc.git
~$ cd Jinja24Doc
~$ python setup.py install

Release files for jinja24doc 1.3.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for jinja24doc 1.3.4
File Size Uploaded
jinja24doc-1.3.4.tar.gz 30.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for jinja24doc 1.3.4
File Interpreter ABI Platform
jinja24doc-1.3.4-py3-none-any.whl Python 3 none any Details

Total release size: 104.3 kB

Release files / jinja24doc-1.3.4.tar.gz

Download URL jinja24doc-1.3.4.tar.gz
Size 30.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8ad81757f136bbcd16ce36160ed19f2c1a9e96974792aa84ad98525c7c2743e1
BLAKE2b-256 checksum
How to use checksums
f12f1b5b2b3a38d18264fdaa1b2fdf32acee291766b60533ec0664273d2de518
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.7.1

Release files / jinja24doc-1.3.4-py3-none-any.whl

Download URL jinja24doc-1.3.4-py3-none-any.whl
Size 73.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30243555c5d9e3cfdcbf703e1c0e14f9920a8c51fca4878209fa3446da483eb3
BLAKE2b-256 checksum
How to use checksums
609e6b10e7ec5404883d61fd7ee444cadd59bf83fe47ad2360055189d6136650
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.2 CPython/3.6.7

Release history Release notifications | RSS feed

This release

1.3.4 This release

2 release files

1.3.3

3 release files

1.3.2

3 release files

1.3.1

1 release file

1.2.0

1 release file

1.1.0

1 release file

1.0.1

1 release file

1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page