{"id":38404394,"url":"https://github.com/tnk-studio/rimuru","last_synced_at":"2026-01-17T04:00:13.974Z","repository":{"id":49692373,"uuid":"161319573","full_name":"TNK-Studio/Rimuru","owner":"TNK-Studio","description":"📖Use TestCase auto generate API document.","archived":false,"fork":false,"pushed_at":"2022-12-08T03:15:48.000Z","size":105,"stargazers_count":5,"open_issues_count":6,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-22T21:26:52.461Z","etag":null,"topics":["documentation-tool","unitests"],"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/TNK-Studio.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":"2018-12-11T10:50:51.000Z","updated_at":"2023-10-23T22:53:32.000Z","dependencies_parsed_at":"2023-01-24T07:15:16.216Z","dependency_job_id":null,"html_url":"https://github.com/TNK-Studio/Rimuru","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/TNK-Studio/Rimuru","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNK-Studio%2FRimuru","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNK-Studio%2FRimuru/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNK-Studio%2FRimuru/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNK-Studio%2FRimuru/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/TNK-Studio","download_url":"https://codeload.github.com/TNK-Studio/Rimuru/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/TNK-Studio%2FRimuru/sbom","scorecard":{"id":137232,"data":{"date":"2025-08-04","repo":{"name":"github.com/TNK-Studio/Rimuru","commit":"f444db31350507c715089468cfae83c500671dcb"},"scorecard":{"version":"v5.2.1-28-gc1d103a9","commit":"c1d103a9bb9f635ec7260bf9aa0699466fa4be0e"},"score":1.7,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#packaging"}},{"name":"Code-Review","score":0,"reason":"Found 0/10 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#token-permissions"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 26 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#sast"}},{"name":"Vulnerabilities","score":0,"reason":"39 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2022-42986 / GHSA-43fp-rhv2-5gv8","Warn: Project is vulnerable to: PYSEC-2023-135 / GHSA-xqr8-7jwr-rhp7","Warn: Project is vulnerable to: PYSEC-2022-238 / GHSA-h3qr-fjhm-jphw","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2019-15 / GHSA-hvmf-r92r-27hr","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2023-62 / GHSA-m2qf-hxjv-5gpq","Warn: Project is vulnerable to: PYSEC-2024-60 / GHSA-jjg7-2v4v-x38h","Warn: Project is vulnerable to: PYSEC-2019-217 / GHSA-462w-v97r-4m45","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: PYSEC-2021-66 / GHSA-g3rq-g295-4j3m","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h","Warn: Project is vulnerable to: PYSEC-2020-92 / GHSA-hj5v-574p-mj7c","Warn: Project is vulnerable to: PYSEC-2022-42969","Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q","Warn: Project is vulnerable to: GHSA-34jh-p97f-mpxf","Warn: Project is vulnerable to: PYSEC-2023-212 / GHSA-g4mx-q9vg-27p4","Warn: Project is vulnerable to: GHSA-pq67-6m6q-mj2v","Warn: Project is vulnerable to: PYSEC-2023-192 / GHSA-v845-jxx5-vc9f","Warn: Project is vulnerable to: PYSEC-2020-148 / GHSA-wqvq-5m8c-6g24","Warn: Project is vulnerable to: PYSEC-2021-108","Warn: Project is vulnerable to: GHSA-2g68-c3qc-8985","Warn: Project is vulnerable to: GHSA-f9vj-2wh5-fj8j","Warn: Project is vulnerable to: PYSEC-2019-140 / GHSA-gq9m-qvpx-68hc","Warn: Project is vulnerable to: PYSEC-2023-221 / GHSA-hrfv-mqp8-q5rw","Warn: Project is vulnerable to: GHSA-j544-7q9p-6xp8","Warn: Project is vulnerable to: PYSEC-2023-57 / GHSA-px8h-6qxv-m22q","Warn: Project is vulnerable to: GHSA-q34m-jh98-gwm2","Warn: Project is vulnerable to: PYSEC-2023-58 / GHSA-xg9f-g7g7-2323","Warn: Project is vulnerable to: PYSEC-2022-203","Warn: Project is vulnerable to: GHSA-jfmj-5v4g-7637"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/c1d103a9bb9f635ec7260bf9aa0699466fa4be0e/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T06:54:13.190Z","repository_id":49692373,"created_at":"2025-08-16T06:54:13.191Z","updated_at":"2025-08-16T06:54:13.191Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28494113,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-17T02:39:23.645Z","status":"ssl_error","status_checked_at":"2026-01-17T02:34:19.649Z","response_time":85,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["documentation-tool","unitests"],"created_at":"2026-01-17T04:00:12.027Z","updated_at":"2026-01-17T04:00:13.906Z","avatar_url":"https://github.com/TNK-Studio.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Rimuru\n[![PyPI](https://img.shields.io/pypi/v/rimuru.svg)](https://pypi.org/project/rimuru/)\n[![Build Status](https://travis-ci.org/TNK-Studio/Rimuru.svg?branch=master)](https://travis-ci.org/TNK-Studio/Rimuru)\n[![codecov](https://codecov.io/gh/elfgzp/Rimuru/branch/master/graph/badge.svg)](https://codecov.io/gh/elfgzp/Rimuru)\n\n📖用单元测试自动生成接口文档\n\n## 已适配的客户端\n\n- [x] requests   \n- [x] django.test.client\n- [ ] flask.testing.FlaskClient\n\n## 生成格式\n- [x] markdown\n- [ ] swagger\n\n## 使用方法\n\n`pip install rimuru`\n\n### 用requests模块进行测试\n\n```python\nimport unittest\nimport requests as requests_module\nfrom rimuru import doc_client, APIDocument\n\nclass APITestCase(unittest.TestCase):\n    def setUp(self):\n        self.api_document = APIDocument()\n\tself.client = doc_client(self.api_document, requests_module)\n       \n    def test_api(self):\n        url = 'http://127.0.0.1:5000/api/books'\n        method = 'GET'\n        name = '书列表接口'\n        \n        self.api_document.set_api_name(method=method, url=url, name=name)\n        response = self.client.get(url)\n        \"\"\"\n        你的测试逻辑\n\t    self.assertEqual(response.status_code, 200)\n\t    \t...\n        \"\"\"\n        self.client.get(\n            url, params={'name': 'A'},\n            headers={'TEST_HEADER': 'test'},\n            requires={'name': False},\n            add_response=False\n        )\n        \n        url = 'http://127.0.0.1:5000/api/books/\u003cint:id\u003e'\n        method = 'GET'\n        name = '书详情接口'\n        self.api_document.set_api_name(method=method, url=url, name=name)\n        self.client.get('http://127.0.0.1:5000/api/books/2')\n        response = self.client.get('http://127.0.0.1:5000/api/books/4')\n        self.assertEqual(response.status_code, 404)\n\t\t\n        self.api_document.save(file_path='tests/')\n```\n\n### 用django.test.client模块进行测试\n```python\nimport django.test import TestCase\nfrom rimuru import doc_client, APIDocument\n\nclass APITestCase(unittest.TestCase):\n    def setUp(self):\n        self.api_document = APIDocument()\n\tself.client = doc_client(self.api_document, self.client)\n\n    def test_api(self):\n        url = 'http://127.0.0.1:5000/api/books'\n        method = 'GET'\n        name = '书列表接口'\n\n        self.api_document.set_api_name(method=method, url=url, name=name)\n        response = self.client.get(url)\n        \"\"\"\n        你的测试逻辑\n\t    self.assertEqual(response.status_code, 200)\n\t    \t...\n        \"\"\"\n        self.client.get(\n            url, data={'name': 'A'},\n            requires={'name': False},\n            add_response=False,\n            **{'HTTP_TEST_HEADER': 'test'}\n        )\n\n        url = 'http://127.0.0.1:5000/api/books/\u003cint:id\u003e'\n        method = 'GET'\n        name = '书详情接口'\n        self.api_document.set_api_name(method=method, url=url, name=name)\n        self.client.get('http://127.0.0.1:5000/api/books/2')\n        response = self.client.get('http://127.0.0.1:5000/api/books/4')\n        self.assertEqual(response.status_code, 404)\n\n        self.api_document.save(file_path='tests/')\n```\n### 生成文档\n#### 书籍列表接口.md\n\n```markdown\n## 书列表接口\n\n### 请求地址\n\n`GET`  `http://127.0.0.1:5000/api/books`\n\n### 请求头\n\n| 参数名  | 必填 | 参考值                           |\n| ------- | ---- | -------------------------------- |\n|TEST_HEADER|True|test|\n\n### 请求参数\n\n| 参数名   | 类型   | 必填 | 描述 | 默认值 | 参考值 |\n| -------- | ------ | ---- | ---- | ------ | ------ |\n|name|String|False|||A|\n\n### 返回正确\n\n状态码 `200`\n​```json\n[\n    {\n        \"id\": 1,\n        \"name\": \"A\"\n    },\n    {\n        \"id\": 2,\n        \"name\": \"B\"\n    },\n    {\n        \"id\": 3,\n        \"name\": \"C\"\n    }\n]\n​```\n```\n\n#### 书详情接口.md\n```markdown\n## 书详情接口\n\n### 请求地址\n\n`GET`  `http://127.0.0.1:5000/api/books/\u003cint:id\u003e`\n\n### 返回正确\n\n状态码 `200`\n\n​```json\n{\n    \"id\": 2,\n    \"name\": \"B\"\n}\n​```\n### 返回错误\n\n状态码 `404`\n\n​```json\n{\n    \"msg\": \"Not Found\"\n}\n​```\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnk-studio%2Frimuru","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftnk-studio%2Frimuru","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftnk-studio%2Frimuru/lists"}