Skip to main content

WhooshDoc is an indexed, full-text search tool for Python docstrings. It uses Whoosh to do the indexing and searching, hence the name. It includes tools for collecting docstrings to index them and for searching the index.

Prerequisites

For searching a prepared index, all you need is Whoosh. WhooshDoc uses epydoc to traverse packages and collect their docstrings in order to build a search index. However, epydoc is not required; you can add to a WhooshDoc index using the Whoosh API (see whooshdoc/util.py for the schema), without using epydoc.

This package uses setuptools for installation and for locating a default WhooshDoc index. WhooshDoc uses argparse for command line arguments.

Installation

You can install WhooshDoc, along with its dependencies, using with setuptools’ easy_install:

$ easy_install WhooshDoc

or via the normal setup.py mechanism after downloading and unpacking the tarball:

$ cd WhooshDoc-1.0
$ python setup.py install

To use the wxPython search GUI, you must install Enthought’s Traits and TraitsBackendWX packages. To do this, use the following easy_install command:

$ easy_install 'WhooshDoc[ui]'

The development source may be checked out via Subversion:

$ svn co https://svn.enthought.com/svn/enthought/WhooshDoc/trunk WhooshDoc

wdoc

WhooshDoc comes with one script, wdoc. It has several sub-commands. Use “wdoc –help” and “wdoc <sub-command> –help” to see detailed help.

To index a package using epydoc to collect docstrings, use “wdoc index”. For example:

$ wdoc index numpy

To use the console search utility, use “wdoc search”. For example:

$ wdoc search --help   # For an explanation of the query syntax.
$ wdoc search bessel or airy not filter
$ wdoc search '"phrase searches need weird quoting"'
              # because shells also interpret quote characters.

To use the wxPython GUI, use “wdoc ui”. For example:

$ wdoc ui
$ wdoc ui bessel or airy not filter

To explicitly specify the WhooshDoc index directory, use the -i/–index option before any of these sub-commands. For example:

$ wdoc --index ~/Library/WhooshDoc search bessel

To remove certain docstrings (e.g., because you updated a package and want to reindex it), use “wdoc delgroups”. For example:

# First, index a couple of scipy packages with the group name "scipy"
$ wdoc index --group scipy scipy.linalg scipy.optimize
# Now delete them.
$ wdoc delgroups scipy

IPython

WhooshDoc includes an IPython “magic” command, %whoosh, which performs a WhooshDoc query and presents the results in the console, like the “wdoc search” command. The %whoosh command integrates with IPython’s help mechanisms to display the help for the individual items. To enable it, add the following to your ipy_user_conf.py file:

from whooshdoc.ipython import enable
enable('/path/to/whooshdoc/index')

Now, you can search using %whoosh in IPython. For example:

In [10]: %whoosh bessel or airy not filter

Bugs

Please make a ticket on the Enthought Tool Suite (ETS) Trac instance:

https://svn.enthought.com/enthought

Or send an email to the enthought-dev mailing list:

https://mail.enthought.com/mailman/listinfo/enthought-dev

To Do

  • Simple web app using wsgiref.

Metadata

Release files for WhooshDoc 1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for WhooshDoc 1.0
File Size Uploaded
WhooshDoc-1.0.tar.gz 17.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for WhooshDoc 1.0
File Interpreter ABI Platform
WhooshDoc-1.0-py2.5.egg Legacy Egg format - - Details

Total release size: 55.8 kB

Release files / WhooshDoc-1.0.tar.gz

Download URL WhooshDoc-1.0.tar.gz
Size 17.6 kB
Tags Source
SHA-256 checksum
How to use checksums
a03e64975029280aa0ed7581f6300f21d2290a0d440f8e8cf550f821e0434d91
BLAKE2b-256 checksum
How to use checksums
0521171f556106adf38e1ecf24131f0c4506f4b23d2c195c0f3eecb8d43ced59
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / WhooshDoc-1.0-py2.5.egg

Download URL WhooshDoc-1.0-py2.5.egg
Size 38.2 kB
Tags Egg
SHA-256 checksum
How to use checksums
576b3156c7369bc0ac95dddacc83483eb0de317485f54370e0f57ad0e00c2e67
BLAKE2b-256 checksum
How to use checksums
faafdcdb343ff6ea97652b91ec1bd20c717bebfa8e74ea38d8c15f98153cbd0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page