Skip to main content

For more faster to create semi-project based on flask

Project description

yqn_project_cli

For more faster to create semi-project based on flask

##console runner ####new_json_config_file由初始项目json_config_file复制过来,后续整个项目生命周期的路由部分以新文件为依据
初始化项目:yqn-project -c absolute_json_config_file_path

初始化或更新module:yqn-autoview - c new_json_config_file_path

##json-config-file format:

{
  "app_id": 22010,
  "app_name": "project_name",
  "app_path": "absolute_project_dir_path",
  "path_list": [
    {
      "path": "/index/", 
      "module": "main",
      "view_cls": "Index",
      "view_mth": "get_index",
      "http_methods": ["GET", "POST"],
      "doc": "默认"
    },
    {
      "path": "/tool/",
      "module": "tool",
      "view_cls": "Index",
      "view_mth": "get_tool",
      "http_methods": ["GET", "POST"],
      "doc": "工具"
    }
  ]
}

##json-file参数解释:
app_id:项目唯一数字标识

项目(app_name)位于路径(app_path)下

path_list:所有需路由对象信息数组

path: http请求路径

module: api下的对应模块,便于分块,如 main、tool

view_cls: api对应模块下views.py文件内的视图类, 如 Index

view_mth: 对应视图类下实例方法, 如 get_index、get_tool,http请求时产生调用

http_methods: 支持http请求方式

doc: 方法doc描述


##初始项目结构描述(api/common/config/rpc/scripts/thirds/utils,以及入口和打包文件) ###api:接口模块 #####api.*子模块: ######1.handler:功能逻辑 ######2.model:模型定义 ######3.parser:参数解析校验 ######4.views:视图逻辑

###common:通用或不明晰模块

###config:项目配置

###rpc(http):调用封装

###scripts:脚本罗列

###thirds:三方插件

###utils:功能函数

###其他:一些入口或打包文件

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

yqn_project_cli-0.0.0rc89.tar.gz (37.6 kB view hashes)

Uploaded Source

Built Distribution

yqn_project_cli-0.0.0rc89-py3-none-any.whl (57.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page