Skip to main content

Load Python objects documentation.

Project description

pytkdocs

ci documentation pypi version

Load Python objects documentation.

Requirements

pytkdocs requires Python 3.6 or above.

To install Python 3.6, I recommend using pyenv.
# install pyenv
git clone https://github.com/pyenv/pyenv ~/.pyenv

# setup pyenv (you should also put these three lines in .bashrc or similar)
export PATH="${HOME}/.pyenv/bin:${PATH}"
export PYENV_ROOT="${HOME}/.pyenv"
eval "$(pyenv init -)"

# install Python 3.6
pyenv install 3.6.8

# make it available globally
pyenv global system 3.6.8

Installation

With pip:

python3.6 -m pip install pytkdocs

With pipx:

python3.6 -m pip install --user pipx

pipx install --python python3.6 pytkdocs

Usage

pytkdocs accepts JSON on standard input and writes JSON on standard output.

Input format:

{
  "objects": [
    {
      "path": "my_module.my_class",
      "members": true,
      "filters": [
        "!^_[^_]"
      ]
    }
  ]
}

Configuration

The configuration options available are:

  • filters: filters are regular expressions that allow to select or un-select objects based on their name. They are applied recursively (on every child of every object). If the expression starts with an exclamation mark, it will filter out objects matching it (the exclamation mark is removed before evaluation). If not, objects matching it are selected. Every regular expression is performed against every name. It allows fine-grained filtering. Example:

    • !^_: filter out every object whose name starts with _ (private/protected)
    • ^__: but still select those who start with two _ (class-private)
    • !^__.*__$: except those who also end with two _ (specials)
  • members: this option allows to explicitly select the members of the top-object. If True, select every members that passes filters. If False, select nothing. If it's a list of names, select only those members, and apply filters on their children only.

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

pytkdocs-0.5.1.tar.gz (22.2 kB view details)

Uploaded Source

Built Distribution

pytkdocs-0.5.1-py3-none-any.whl (26.8 kB view details)

Uploaded Python 3

File details

Details for the file pytkdocs-0.5.1.tar.gz.

File metadata

  • Download URL: pytkdocs-0.5.1.tar.gz
  • Upload date:
  • Size: 22.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.3 Linux/5.6.15-arch1-1

File hashes

Hashes for pytkdocs-0.5.1.tar.gz
Algorithm Hash digest
SHA256 1be3f4bf9f69accbd86cb2b070f0b3c1f9dd61b1f8e6f391da0c68bd2dde2942
MD5 15c14a666c2a6077d0358e6cc4205d0c
BLAKE2b-256 06f1944c7ffaf72a81bd05f89557789a49408cd4c6247c78d7547e08b1648be2

See more details on using hashes here.

File details

Details for the file pytkdocs-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: pytkdocs-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 26.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.5 CPython/3.8.3 Linux/5.6.15-arch1-1

File hashes

Hashes for pytkdocs-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 71cbd81bfc39b8747d92f02e5027dca80a5702b7090cee285d3a0a1f41bff779
MD5 191424bf42e39a8afe0e1efa62640108
BLAKE2b-256 850852df6a79a21ec3a23999282915c382cd08b297e12dd87fc20e5cbb389b5f

See more details on using hashes here.

Supported by

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