{"id":15893114,"url":"https://github.com/ziselsberger/doc_to_readme","last_synced_at":"2026-02-23T07:08:38.282Z","repository":{"id":153523032,"uuid":"620923644","full_name":"ziselsberger/doc_to_readme","owner":"ziselsberger","description":"Automated extraction of function and class docstrings, and further creation/update of documentation in README File.","archived":false,"fork":false,"pushed_at":"2024-12-14T16:19:33.000Z","size":600,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-11T22:08:05.599Z","etag":null,"topics":["automated","cicd","documentation","markdown","python","readme"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ziselsberger.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-03-29T16:29:33.000Z","updated_at":"2024-12-14T16:19:37.000Z","dependencies_parsed_at":"2024-10-28T03:06:20.088Z","dependency_job_id":"12c59e7a-4158-46c8-8378-86c9ad5aff3c","html_url":"https://github.com/ziselsberger/doc_to_readme","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/ziselsberger/doc_to_readme","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziselsberger%2Fdoc_to_readme","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziselsberger%2Fdoc_to_readme/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziselsberger%2Fdoc_to_readme/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziselsberger%2Fdoc_to_readme/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ziselsberger","download_url":"https://codeload.github.com/ziselsberger/doc_to_readme/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ziselsberger%2Fdoc_to_readme/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267842974,"owners_count":24153133,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-07-30T02:00:09.044Z","response_time":70,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automated","cicd","documentation","markdown","python","readme"],"created_at":"2024-10-06T08:07:37.376Z","updated_at":"2025-10-25T21:02:05.361Z","avatar_url":"https://github.com/ziselsberger.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Automated Python Documentation in README file\n\n\u003e [!NOTE]\n\u003e Available on [PyPI](https://pypi.org/project/doc-to-readme)\n\n## What's this?\n\nAutomated docstring extraction and creation/update of documentation of python modules in the README File.\n\n### Why should I use it?\n\nBecause it's nice to have a quick overview of all the functions, classes and methods of your module documented in the README file ;-)\n\n### How does it work?\n\n[doc_to_md.py](src/doc_to_md/doc_to_md.py) loops through all Python files in the Repository, and extracts the function calls \u0026 the corresponding short description from the docstrings. These are added to a dictionary and afterwards converted to a Markdown Table. Finally, the section **_Functions \u0026 Classes_** is appended / updated in the README File.\n\nThere are two options how to use it:  \na) [CI Pipeline](#a-add-to-pipeline-github-gitlab-bitbucket-or-azure-devops)  \nb) [Python Package](#b-install--use-the-python-package)   \n\n### a) include it in your CI Pipeline (GitHub, GitLab, Bitbucket or Azure Devops)\nCheck out this [**_Step-by-step guide_**](https://github.com/ziselsberger/use_doc_to_readme) on how to integrate _doc_to_readme_ in your Repository.\n\n### b) install \u0026 use the Python Package\n\n```shell\npip install doc-to-readme\n```\n\n- **Use within Python** \n```python\nimport doc_to_md.doc_to_md as dtm\n\ndtm.update_markdown_file(\n    file=\"README.md\",\n    root_dir=None,              # Directory used as root for searching modules, defaults to folder containing README.md\n    exclude_modules=None,       # List of modules to be excluded\n    specified_modules=None,     # Only these modules will be included\n    separate=True               # Create one table per module\n)\n```\n\n- **Command Line**\n```shell\npython -m doc_to_md.doc_to_md -f \"README.md\" [-r ROOT_DIR] [-e EXCLUDE_MODULES] [-m SELECTED_MODULES] [--separated]\n\n-r ROOT_DIR             # Directory used as root for searching modules, defaults to folder containing README.md\n-e EXCLUDE_MODULES      # List of modules to be excluded\n-m SELECTED_MODULES     # Only these modules will be included\n--separated             # Create one table per module\n```\n\n---\n\n_Copyright \u0026copy; 2023 by Mirjam Ziselsberger_  \n_This code is free to use under the terms of the [MIT license](/LICENSE)._\n\n## Functions \u0026 Classes  \n\n### [doc_to_md.py](./src/doc_to_md/doc_to_md.py)\n\n| Type | Name/Call | Description |\n| --- | --- | --- |\n| function  | \u003cpre lang='py'\u003eloop_through_repo(\u0026#13;  file: str, \u0026#13;  root_dir: str = None, \u0026#13;  exclude_modules: Optional[Tuple[str, ...]] = None, \u0026#13;  specified_modules: Optional[Tuple[str, ...]] = None\u0026#13;) -\u003e None\u003c/pre\u003e | Collect documentation from functions \u0026 classes. |\n| function  | \u003cpre lang='py'\u003eadd_summary_to_md(\u0026#13;  overview_dict: Dict[str, Optional[Union[str, Dict[str, str]]]], \u0026#13;  markdown: str, \u0026#13;  separate: bool = True\u0026#13;)\u003c/pre\u003e | Add Table with all Functions \u0026 Classes to Markdown file. |\n| function  | \u003cpre lang='py'\u003eupdate_markdown_file(\u0026#13;  file: str = \"../../README.md\", \u0026#13;  root_dir: str = None, \u0026#13;  exclude_modules: Optional[Tuple[str, ...]] = (\u0026#13;    \"test\", \u0026#13;    \"functions_for_testing\", \u0026#13;    \"classes_for_testing\", \u0026#13;    \"doc_to_md\"\u0026#13;  ), \u0026#13;  specified_modules: Optional[Tuple[str, ...]] = None, \u0026#13;  separate: bool = True\u0026#13;)\u003c/pre\u003e | Add/update 'Functions \u0026 Classes' Section in Markdown file. |\n| function  | \u003cpre lang='py'\u003eparse_through_file(file: str) -\u003e Dict[str, Dict[str, str]]\u003c/pre\u003e | Parse through file, return dict with classes and functions. |\n\n### [test_dtm.py](./tests/test_dtm.py)\n\n| Type | Name/Call | Description |\n| --- | --- | --- |\n| class  | \u003cpre lang='py'\u003eLoopThroughRepo\u003c/pre\u003e | None |\n| method (LoopThroughRepo) | \u003cpre lang='py'\u003esetUp(self) -\u003e None\u003c/pre\u003e | None |\n| method (LoopThroughRepo) | \u003cpre lang='py'\u003etest_loop_through_repo(self)\u003c/pre\u003e | None |\n| method (LoopThroughRepo) | \u003cpre lang='py'\u003etest_loop_through_repo_specified_modules(self)\u003c/pre\u003e | None |\n| method (LoopThroughRepo) | \u003cpre lang='py'\u003etest_loop_through_repo_exclude_modules(self)\u003c/pre\u003e | None |\n\nCreated with: [doc_to_readme](https://github.com/ziselsberger/doc_to_readme)  \n[MIT](https://github.com/ziselsberger/doc_to_readme/blob/main/LICENSE) \u0026copy; 2023 Mirjam Ziselsberger\n\n---\n**Last Update:** 2024-12-14","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziselsberger%2Fdoc_to_readme","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fziselsberger%2Fdoc_to_readme","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fziselsberger%2Fdoc_to_readme/lists"}