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.5.2.tar.gz
.
File metadata
- Download URL: pytkdocs-0.5.2.tar.gz
- Upload date:
- Size: 22.6 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | df2519d76d02ce7e27f2aa462a50dcb6fb5c5e60de358afadbdf48046df71a2f |
|
MD5 | 587e184308104b61b0be9bc5631f4218 |
|
BLAKE2b-256 | aa0ad4129e1f85d9b62adcf0d4f42eebf236522c9a5ac12aeed8f9a0b137fe2a |
File details
Details for the file pytkdocs-0.5.2-py3-none-any.whl
.
File metadata
- Download URL: pytkdocs-0.5.2-py3-none-any.whl
- Upload date:
- Size: 27.3 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee6424039c7e5f7a57868bf640caec8b1496cebe516c63f2f053f0ee62c6884e |
|
MD5 | 0dec242a76c0d6cbfa0721c6297d5345 |
|
BLAKE2b-256 | f0150283cfca38b23ad7357be99d6cf8607384c9f44e635e425ad725744a5b9b |