Skip to main content

Load Python objects documentation.

Project description

pytkdocs

pipeline status coverage report 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:

{
  "global_config": {},
  "objects": [
    {
      "path": "my_module.my_class",
      "config": {}
    }
  ]
}

Configuration

For now, the only configuration option available is filters, which allows you to select objects based on their name. It is a list of regular expressions. If the expression starts with an exclamation mark, it will filter out objects matching it (the exclamation mark is removed before evaluation). You shouldn't need a literal ! at the beginning of a regex (as it's not a valid character for Python objects names), but if you ever need one, you can add it in brackets: [!].*.

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)

You can obviously make use of your regex-fu to reduce the number of regular expressions and make it more efficient.

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.1.0.tar.gz (14.2 kB view details)

Uploaded Source

Built Distribution

pytkdocs-0.1.0-py3-none-any.whl (17.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pytkdocs-0.1.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.6.9 Linux/5.4.3-arch1-1

File hashes

Hashes for pytkdocs-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bbba9e185b96cc358f0a497e183d5868a6da88ca9c4e12d200dba7b267d8bfb8
MD5 92bb2ca4f22948a0cb67905254643416
BLAKE2b-256 925429ff8c5963ab0b341ae192165300ed71d890ee40263cda98bf9362d5069f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pytkdocs-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 17.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.0.0 CPython/3.6.9 Linux/5.4.3-arch1-1

File hashes

Hashes for pytkdocs-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb88662791c99792bc373042ba0232a0751f46b8560b93f68008526ba28561e
MD5 13089bebc0fd5ec84a2541d1d4a99775
BLAKE2b-256 fe4097f32407f2ad0d537edde9de0848a80a4f6e3e88ef6f7e40afd4238fb3a0

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