upgrade docstrings
add gen_api.py to generate _static/api.txt