Load Python objects documentation.
Project description
pytkdocs
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. IfTrue
, select every members that passes filters. IfFalse
, select nothing. If it's a list of names, select only those members, and apply filters on their children only.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file pytkdocs-0.4.0.tar.gz
.
File metadata
- Download URL: pytkdocs-0.4.0.tar.gz
- Upload date:
- Size: 21.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.6.11-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b0542955a938edeef785c2d93cb40ec71ca7271cf0b63ae9b4b5acd355c14cc |
|
MD5 | 9d57b12cabe9cddcc5308ffd56ea8991 |
|
BLAKE2b-256 | 8e2e07318e712894b30edfd08dca4999f28eb9484e30ee8eb798d5dd21097836 |
File details
Details for the file pytkdocs-0.4.0-py3-none-any.whl
.
File metadata
- Download URL: pytkdocs-0.4.0-py3-none-any.whl
- Upload date:
- Size: 26.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.0.5 CPython/3.8.2 Linux/5.6.11-arch1-1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e3574da390a1b11cfa8b3f1d63028bf01057a4bd331ac35f043b7b7662ca6d7 |
|
MD5 | f78a5e89cc4b0280d072cf2dbed9c9f7 |
|
BLAKE2b-256 | 648687636be419d2b538ea2e956ee79738adc85f5bdaeaf8f8ecd1c80ac0bcd5 |