Skip to main content generator

Project description


$ [sudo] pip install readme-md


  • auto headers (if section 1st line not empty and not # header) - section name as header title
  • <section>.md files as sections
  • install, classes, functions, sections for project with setup.cfg


readme_md.Readme - generator. attrs and properties as README sections, ordered by order

method __doc__
get_sections() return all sections in a list of (name, string) pairs sorted by order
header(section_name) return section header string
load_sections(path='.') load sections from .md markdown files
render() return README string
save(path='') save to file


function __doc__
readme_md.get.attrs(cls) return README attributes of a class in a list of (name, value) pairs. object __readme__ required
readme_md.get.classes(modules) return list of README classes. module __all__ or __readme__ required
readme_md.get.doc(obj) return first line of an object docstring
readme_md.get.functions(modules) return list of README functions. module __all__ or __readme__ required
readme_md.get.methods(cls) return README methods of a class in a list of (name, method) pairs. class __readme__ required
readme_md.get.modules() load python files and return its module objects. setup.cfg [options] py_modules or packages required return README properties of a class in a list of (name, prop) pairs. class __readme__ required
readme_md.get.python_sections() return a dictionary with python project sections: install, classes, functions, cli. setup.cfg required
readme_md.get.spec(func) return a string with Python function specification
readme_md.tables.attrs(cls) return a string with class attributes table
readme_md.tables.classes(classes) return a string with classes table
readme_md.tables.cls(cls) return a string with class name, description and attrs+methods+properties tables
readme_md.tables.functions(functions) return a string with functions table
readme_md.tables.methods(cls) return a string with class methods table return a string with class properties table
readme_md.tables.usage(modules) return a string with cli modules usage table. python -m module or module USAGE variable (if defined). if __name__ == "__main__" line required


usage __doc__
python -m readme_md.create [path ...] generate


# .data/README/, .data/README/
$ python -m readme_md.create .data/README >
>>> class Readme_npm(readme_md.Readme):
    order = ["description","features","install", ...]
    disabled = ["generator"]

    def install(self):
        return "`$ [sudo] npm i -g %s`" % json.loads(path)["name"]
>>> Readme(".data/README").save("") # load sections and create

readme-md - generator

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

readme-md-2018.11.28.tar.gz (4.6 kB view hashes)

Uploaded Source

Built Distribution

readme_md-2018.11.28-py2.py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page