API Reference

You can see below the modules of the pywebdoc package.

url

The url module manages the URLS. The URLS are ckecked with requests.

url.check_url(url, log=True)

Return True if no 404 error on url, else False.

url.open_url(url)

Open url if no 404 error is catched.

class url.UrlTemplate(template)

Bases: object

Manage an url template.

property template

Get url template.

render(**kwargs)

Render url template.

open_url(**kwargs)

Render the url template and open it.

packages

The packages module manages installed PyPI packages.

class packages.Package(name)

Bases: object

Manage an installed PyPI package.

property name

Get name.

property url

Get PyPI url.

property version

Get version.

property summary

Get summary.

property home_page

Get home-page.

static get_list()

Return the list of installed packages.

static make_html_list(filename)

Make html file with packages list.

pip

The pip module can call the pip command to get informations about installed PyPI packages.

pip.call(*args)

Call pip command and get result.

pip.get_installed_packages()

Return the list of installed packages.

pip.get_url(package)

Get the home-page url of a PyPI package. The package must be installed.

template

The template module manages templates. It uses jinja2.

class template.Templates(directory)

Bases: object

Manage the templates.

property env

Get environment.

get_template(filename)

Return a template.

logger

The logger module manages the configuration of the logger. It uses colorlog to get colored logging messages.

logger.logger_config(level, name=None)

Setup the logging environment.

error

The error module manages errors of pywebdoc.

exception error.PywebdocError

Bases: Exception

Custom class to raise pywebdoc exceptions.