{"id":22468486,"url":"https://github.com/projectweekend/documd","last_synced_at":"2025-03-27T15:44:31.868Z","repository":{"id":57423413,"uuid":"55274285","full_name":"projectweekend/documd","owner":"projectweekend","description":"Simple markdown documentation from docstrings","archived":false,"fork":false,"pushed_at":"2016-04-03T00:09:52.000Z","size":20,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-02T00:20:38.229Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/projectweekend.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}},"created_at":"2016-04-02T02:44:30.000Z","updated_at":"2016-04-02T02:44:41.000Z","dependencies_parsed_at":"2022-09-05T11:10:44.458Z","dependency_job_id":null,"html_url":"https://github.com/projectweekend/documd","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Fdocumd","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Fdocumd/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Fdocumd/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/projectweekend%2Fdocumd/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/projectweekend","download_url":"https://codeload.github.com/projectweekend/documd/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245874169,"owners_count":20686714,"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","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":[],"created_at":"2024-12-06T11:16:56.994Z","updated_at":"2025-03-27T15:44:31.844Z","avatar_url":"https://github.com/projectweekend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://build.exitcodezero.io/api/badges/projectweekend/documd/status.svg)](https://build.exitcodezero.io/projectweekend/documd)\n\n\n# Usage\nWrite markdown documentation in your classes and decorate them with `documd.documentation.register`:\n```python\nfrom documd import documentation\n\n\n@documentation.register(doc_name='API_ROUTES.md', section='This Stuff', title='This route')\nclass ThisApiRoute:\n    \"\"\"\n    **POST:**\n    ```\n    /v1/this\n    ```\n\n    **Body:**\n    ```json\n    {\n        \"message\": \"this\"\n    }\n    ```\n\n    **Response:**\n    ```json\n    {\n        \"message\": \"this\"\n    }\n    ```\n\n    **Status Codes:**\n    * `200` if successful\n    * `400` if incorrect data provided\n    \"\"\"\n\n\n@documentation.register(doc_name='API_ROUTES.md', section='That Stuff', title='That route')\nclass ThatApiRoute:\n    \"\"\"\n    **POST:**\n    ```\n    /v1/that\n    ```\n\n    **Body:**\n    ```json\n    {\n        \"message\": \"that\"\n    }\n    ```\n\n    **Response:**\n    ```json\n    {\n        \"message\": \"that\"\n    }\n    ```\n\n    **Status Codes:**\n    * `200` if successful\n    * `400` if incorrect data provided\n    \"\"\"\n```\n\nThen use the `documd.documentation.generate` function in a script to output to a markdown file. Be sure to import the package that contains the decorated classes/functions in your script. For example, assuming that the two decorated classes above are in the `example.py`, a script ('example_script.py') might look like this:\n```python\n#!/usr/bin/env python\nfrom documd import documentation\nimport example.py\n\n\ndef main():\n    documentation.generate(output_path=='.')\n\n\nif __name__ == \"__main__\":\n    main()\n```\n\nThen run your script to rebuild the markdown file:\n```\n./example_script.py\n```\n\nAn example output file can be found in [test/output_example.md](test/output_example.md).\n\n\n# Run tests\n```\ndocker-compose run cli nosetests -v\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fdocumd","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fprojectweekend%2Fdocumd","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fprojectweekend%2Fdocumd/lists"}