Skip to main content

Jinja24Doc for Python

Project description

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.

Source tarball

~$ wget https://pypi.python.org/packages/source/j/jinja24doc/jinja24doc-1.3.2.tar.gz
~$ tar xzf jinja24doc-1.3.2.tar.gz
~$ cd jinja24doc-1.3.2
~$ python setup.py install

Source from git

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

Install from PyPI

Don’t forget to install all packages first. Jinja24Doc will need it to install, but pip do not install packages first even if it download automatically.

~$ pip install jinja2
~$ pip install jinja24doc

Unstable version

From git unstable branch:

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

or from zip package:

~$ wget https://github.com/PoorHttp/Jinja24Doc/archive/unstable.zip
~$ unzip unstable.zip
~$ cd Jinja24Doc-unstable
~$ python setup.py install

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jinja24doc-1.3.2.tar.gz (29.7 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

jinja24doc-1.3.2-py3-none-any.whl (52.2 kB view details)

Uploaded Python 3

jinja24doc-1.3.2-py2-none-any.whl (75.5 kB view details)

Uploaded Python 2

File details

Details for the file jinja24doc-1.3.2.tar.gz.

File metadata

  • Download URL: jinja24doc-1.3.2.tar.gz
  • Upload date:
  • Size: 29.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/3.6.7

File hashes

Hashes for jinja24doc-1.3.2.tar.gz
Algorithm Hash digest
SHA256 c11817c3f747f7bd90a0608a88769fff6bdc2417161d13bdca5e8a648d9bc5a8
MD5 1c48bcfb4cacdeeddd66089e75337905
BLAKE2b-256 23c5323aa3597197e3c9d39e321cf8d4e162b7b0cb9d1f01aa7d3b2b4fa862e4

See more details on using hashes here.

File details

Details for the file jinja24doc-1.3.2-py3-none-any.whl.

File metadata

  • Download URL: jinja24doc-1.3.2-py3-none-any.whl
  • Upload date:
  • Size: 52.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/3.6.7

File hashes

Hashes for jinja24doc-1.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3a073bd236c738280b99f37d45f4a4ee3372e8c99d35fca5ccbb12b10c88c0d
MD5 cac924d7350e52197b1528bc48a8757f
BLAKE2b-256 a554992146555f479d80cd0fe2158ae441770264d5919117d0e07e4c2604453d

See more details on using hashes here.

File details

Details for the file jinja24doc-1.3.2-py2-none-any.whl.

File metadata

  • Download URL: jinja24doc-1.3.2-py2-none-any.whl
  • Upload date:
  • Size: 75.5 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.9.1 pkginfo/1.4.1 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.19.4 CPython/3.6.7

File hashes

Hashes for jinja24doc-1.3.2-py2-none-any.whl
Algorithm Hash digest
SHA256 1c6545df292ae713517dfb5c6cc561b6c0d950c4b934b403846d93209fca1cb1
MD5 4cc47e06fabf9b7766b09006b1cd03f8
BLAKE2b-256 4c36ed061637f876add22b9429baced3df9538e0758128181e58677bb5fb0846

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page