Skip to content inspired Python doc redirector
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

Quick redirects to Python documentation.

Overview is a fairly straight-forward Flask app, with routes with routes declared in pymod/ (preliminary name was, might change the package dir some day).

The actual work is two-part: 1) pymod/ handles indexing of the site (mostly via the requests and BeautifulSoup libraries). And 2) pymod/ looks up names and the URLs to redirect to.

Indexing creates a 'modules cache' file pymod/modules.dat (generated, so it's not visible in the repo). The cache file must be generated locally and is included in the distribution package via standard setuptools mechanics, as can be seen in the and the files.

When running with a module index cache, names are fetched using the url() function in the pymod/ file. The url() function first checks a few special embedded structures representing built-in symbols, then looks for the search term in the modules cache. Certain modules are considered 'priority' and functions in them do not need to be prepended by their module name (e.g. itertools, sys, os, pdb). I have simply chosen modules that I use more often and that I subjectively consider more central.


I can't yet guarantee complete portability from machine to machine for contributing to If interest grows, I'll add it. Since it's not overly complex, you could probably do it, though - you need GNU Make, Python 3 and a recent version of virtualenv. Have a look at the Makefile.

I'm hosting at WebFaction, so obviously I would have to deploy new versions, though ;-). But you can probably have it running locally without too much trouble.

You can’t perform that action at this time.