# api-shop ![PyPI](https://img.shields.io/pypi/v/api-shop?logo=api-shop) ![PyPI - Downloads](https://img.shields.io/pypi/dm/api-shop)
## [Online Documents](https://pcloth.gitee.io/api-shop/)
## [在线文档](https://pcloth.gitee.io/api-shop/)
> ### api-shop:一个易用的、快速的restful-api接口工具包,兼容:`django` / `flask` / `bottle`。
> ### `一切只为少加班。`
## **demo 图片**
![demo](/static/demo.png)
## **核心功能:**
1. 配置化api生成。
2. 自动校验request提交的数据,并转换成指定格式,支持:int,float,list,dict,set,tuple,bool
3. 自动生成api文档,并提供一个web页面可供查询和mock数据演示。
4. 兼容 `django` , `flask` , `bottle` (如果不指定框架,默认按这个顺序识别框架)
5. 自动生成接口`骨架文件`功能(请谨慎开启)。
6. 自定义格式转换器,data_format.datetime格式转换类;'2019-01-18 23:25:25' to datetime
7. 支持正则格式校验。
8. 多国语言支持,也支持自定义语言包。
9. 文档热重载。
10. 默认值支持方法函数。
11. 支持url中包含参数,例如 `/api/user/<id>`,并且在配置methods参数的时候设置它的规则。
12. 支持多url绑定一个接口
13. 支持指定参数的可选项,例如:[1,4,7],收到这个列表之外的参数就会触发bad_request
14. 可以在代码中直接调用Api业务代码:`api_run`(将移除`get_api_result_json`和`get_api_result_response`)
15. 支持在Api类中定义response_docs来制作返回值文档,并支持模型字段引入;以及模型部分字段引入类:ApiResponseModelFields
## [Online Documents](https://pcloth.gitee.io/api-shop/)
## [在线文档](https://pcloth.gitee.io/api-shop/)
Raw data
{
"_id": null,
"home_page": "https://github.com/pcloth/api-shop",
"name": "api-shop",
"maintainer": "pcloth",
"docs_url": null,
"requires_python": "",
"maintainer_email": "pcloth@gmail.com",
"keywords": "api-shop,Flask-RESTful,Django REST framework,RESTful",
"author": "pcloth",
"author_email": "pcloth@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/c3/8c/620f06656d8a97919b7ce7ddd98eb93a8ab76fc0ef3384075055baa2ed1b/api-shop-1.14.1.tar.gz",
"platform": "all",
"description": "# api-shop ![PyPI](https://img.shields.io/pypi/v/api-shop?logo=api-shop) ![PyPI - Downloads](https://img.shields.io/pypi/dm/api-shop)\n\n## [Online Documents](https://pcloth.gitee.io/api-shop/)\n## [\u5728\u7ebf\u6587\u6863](https://pcloth.gitee.io/api-shop/)\n\n> ### api-shop\uff1a\u4e00\u4e2a\u6613\u7528\u7684\u3001\u5feb\u901f\u7684restful-api\u63a5\u53e3\u5de5\u5177\u5305\uff0c\u517c\u5bb9\uff1a`django` / `flask` / `bottle`\u3002\n> ### `\u4e00\u5207\u53ea\u4e3a\u5c11\u52a0\u73ed\u3002`\n\n## **demo \u56fe\u7247**\n\n![demo](/static/demo.png)\n\n\n## **\u6838\u5fc3\u529f\u80fd\uff1a**\n1. \u914d\u7f6e\u5316api\u751f\u6210\u3002\n2. \u81ea\u52a8\u6821\u9a8crequest\u63d0\u4ea4\u7684\u6570\u636e\uff0c\u5e76\u8f6c\u6362\u6210\u6307\u5b9a\u683c\u5f0f\uff0c\u652f\u6301\uff1aint\uff0cfloat\uff0clist\uff0cdict\uff0cset\uff0ctuple\uff0cbool\n3. \u81ea\u52a8\u751f\u6210api\u6587\u6863\uff0c\u5e76\u63d0\u4f9b\u4e00\u4e2aweb\u9875\u9762\u53ef\u4f9b\u67e5\u8be2\u548cmock\u6570\u636e\u6f14\u793a\u3002\n4. \u517c\u5bb9 `django` , `flask` , `bottle` (\u5982\u679c\u4e0d\u6307\u5b9a\u6846\u67b6\uff0c\u9ed8\u8ba4\u6309\u8fd9\u4e2a\u987a\u5e8f\u8bc6\u522b\u6846\u67b6)\n5. \u81ea\u52a8\u751f\u6210\u63a5\u53e3`\u9aa8\u67b6\u6587\u4ef6`\u529f\u80fd\uff08\u8bf7\u8c28\u614e\u5f00\u542f\uff09\u3002\n6. \u81ea\u5b9a\u4e49\u683c\u5f0f\u8f6c\u6362\u5668\uff0cdata_format.datetime\u683c\u5f0f\u8f6c\u6362\u7c7b\uff1b'2019-01-18 23:25:25' to datetime\n7. \u652f\u6301\u6b63\u5219\u683c\u5f0f\u6821\u9a8c\u3002\n8. \u591a\u56fd\u8bed\u8a00\u652f\u6301\uff0c\u4e5f\u652f\u6301\u81ea\u5b9a\u4e49\u8bed\u8a00\u5305\u3002\n9. \u6587\u6863\u70ed\u91cd\u8f7d\u3002\n10. \u9ed8\u8ba4\u503c\u652f\u6301\u65b9\u6cd5\u51fd\u6570\u3002\n11. \u652f\u6301url\u4e2d\u5305\u542b\u53c2\u6570\uff0c\u4f8b\u5982 `/api/user/<id>`\uff0c\u5e76\u4e14\u5728\u914d\u7f6emethods\u53c2\u6570\u7684\u65f6\u5019\u8bbe\u7f6e\u5b83\u7684\u89c4\u5219\u3002\n12. \u652f\u6301\u591aurl\u7ed1\u5b9a\u4e00\u4e2a\u63a5\u53e3\n13. \u652f\u6301\u6307\u5b9a\u53c2\u6570\u7684\u53ef\u9009\u9879\uff0c\u4f8b\u5982\uff1a[1,4,7]\uff0c\u6536\u5230\u8fd9\u4e2a\u5217\u8868\u4e4b\u5916\u7684\u53c2\u6570\u5c31\u4f1a\u89e6\u53d1bad_request\n14. \u53ef\u4ee5\u5728\u4ee3\u7801\u4e2d\u76f4\u63a5\u8c03\u7528Api\u4e1a\u52a1\u4ee3\u7801\uff1a`api_run`\uff08\u5c06\u79fb\u9664`get_api_result_json`\u548c`get_api_result_response`\uff09\n15. \u652f\u6301\u5728Api\u7c7b\u4e2d\u5b9a\u4e49response_docs\u6765\u5236\u4f5c\u8fd4\u56de\u503c\u6587\u6863\uff0c\u5e76\u652f\u6301\u6a21\u578b\u5b57\u6bb5\u5f15\u5165\uff1b\u4ee5\u53ca\u6a21\u578b\u90e8\u5206\u5b57\u6bb5\u5f15\u5165\u7c7b\uff1aApiResponseModelFields\n\n\n\n## [Online Documents](https://pcloth.gitee.io/api-shop/)\n## [\u5728\u7ebf\u6587\u6863](https://pcloth.gitee.io/api-shop/)",
"bugtrack_url": null,
"license": "BSD License",
"summary": "RESTful api shop for django or flask or bottle",
"version": "1.14.1",
"project_urls": {
"Homepage": "https://github.com/pcloth/api-shop"
},
"split_keywords": [
"api-shop",
"flask-restful",
"django rest framework",
"restful"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "c38c620f06656d8a97919b7ce7ddd98eb93a8ab76fc0ef3384075055baa2ed1b",
"md5": "9c08bcd34fec526caf26045e9ed06457",
"sha256": "46d9848b3e7a960f07e6dc4bed66e90fc5788ddf62dff20d2a33672cae6973c9"
},
"downloads": -1,
"filename": "api-shop-1.14.1.tar.gz",
"has_sig": false,
"md5_digest": "9c08bcd34fec526caf26045e9ed06457",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 24937,
"upload_time": "2023-07-07T07:35:13",
"upload_time_iso_8601": "2023-07-07T07:35:13.051984Z",
"url": "https://files.pythonhosted.org/packages/c3/8c/620f06656d8a97919b7ce7ddd98eb93a8ab76fc0ef3384075055baa2ed1b/api-shop-1.14.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-07 07:35:13",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pcloth",
"github_project": "api-shop",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [],
"lcname": "api-shop"
}