基于flask快速、优雅实现restful接口
Project description
flask-crud-api
本库旨在帮助后端开发人员快速构建一个基于flask框架的后端项目。
参数说明
- 分页相关
__page 页码
__page_size 每页数量
# 如果需要禁用分页,可以使用此字段,请谨慎使用
__page_disable
- 添加、修改数据字段
# 鉴于开发时,一次查询将会给出对应的字段模型及相关解释
# 创建、修改数据时可以使用此字段
- 过滤字段
# 这部分字段请结合实际在后端代码中添加需要被过滤的字段内容
# 例如:
view_filter_fields = (("pk", "="),)
view_filters = (SearchFilter, )
- 排序字段
# 如果需要进行排序,请配置view_order_fields、view_filters
"""
view_order_fields = (("__order_pk", 'desc'), )
view_filters = (OrderFilter, ...)
"""
# 例如
view_order_fields = (
("__order_pk", 'desc'),
("__order_pk", 'asc'),
)
view_filters = (SearchFilter, OrderFilter)
# 传递query参数 __order_pk=asc 即可实现pk的升序
# 传递query参数 __order_pk=desc 即可实现pk的降序
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
flask_crud_api-0.0.1.tar.gz
(13.2 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flask_crud_api-0.0.1.tar.gz.
File metadata
- Download URL: flask_crud_api-0.0.1.tar.gz
- Upload date:
- Size: 13.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea3647980b0da6340349a2da90844fd45536bc22c582e55581c8d92c893ba23
|
|
| MD5 |
58f1a02b4aa27b1aea48764da18bcca6
|
|
| BLAKE2b-256 |
69e8bfd157f94825b55094779ff3f9b7c628c7848c5949bf6f2aecc515e36a90
|
File details
Details for the file flask_crud_api-0.0.1-py3-none-any.whl.
File metadata
- Download URL: flask_crud_api-0.0.1-py3-none-any.whl
- Upload date:
- Size: 14.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.6.14
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6406b493452d9ecc9a914a19b429dd3bd41351399dc47f6bf8eeb7523795ecbf
|
|
| MD5 |
e678a3e8da4ff5269a68602795321048
|
|
| BLAKE2b-256 |
1e3dc9b9c42b3010751a44893fc39fb5f631863a8c466ac651aa9991be78e700
|