Skip to main content

插件生成等功能...

Project description

mvtech_plugin


简介

mvtech_plugin是MVTech插件脚手架

基本架构结构

.
├── actions
│   ├── __init__.py
│   ├── ???.py     
│   ├── models.py
├── Dockerfile
├── help.md
├── icon.png
├── main.py
├── Makefile
├── plugin.yaml
├── requirements.txt
├── make_image.sh
├── SDK
│   ├── __init__.py
│   ├── base.py
│   ├── cli.py
│   ├── http_run.py
│   ├── models.py
│   ├── plugin.py
│   ├── run_define.py
│   └── web.py
├── testAPI.py
│   ├── ???.json
└── triggers
    └── models.py
    └── ???.py
  • ?_plugin.yaml: 模板文件,定义插件.
  • actions/???.py: 根据模板文件定义生成动作.
  • triggers/???.py: 根据模板文件定义生成触发器.
  • actions/models.py 和 triggers/models.py: 模板文件继承pydantic
  • testAPI: FastAPI测试入口
  • make_image.sh 打包脚本

环境要求

  • python3.+

安装 依赖

pip install -r requirements.txt

脚手架离线自定义打包安装

脚手架打包

python .\setup.py sdist

脚手架生成的压缩包解压后执行下面命令安装

python setup.py install

脚手架卸载

pip uninstall mvtech-plugin  -y

脚手架使用

执行本地脚手架
mvtech-plugin -h
usage: mvtech-plugin [-h] [-v] [-g GENERATE] [-r RUN] [-hp] [-t TEST] [-tb] [-mki]

插件生成器

optional arguments:
  -h, --help            show this help message and exit
  -v, --version         查看版本
  -g GENERATE, --generate GENERATE
                        插件生成
  -r RUN, --run RUN     运行action
  -hp, --http           启动api接口
  -t TEST, --test TEST  测试
  -tb, --tarball        插件打包
  -mki, --mkimg         制作成docker镜像     

打包出现#!/usr/bin/env python

  • vi 文件名
  • : set ff = unix
  • : wq

打docker镜像包 并且下载过程

make image docker save mvtech/kafka:1.0.0 -o mvtech-kafka-1.0.0.tar

生成系统安装包

make tarball

离线打Docker包

  • docker save : | gzip > _.tar.gz

  • docker save mvtech/rest:1.0.0 | gzip > mvtech_rest_1.0.0.tar.gz

属性类型定义

  • "string": "str",
  • "bytes": "str",
  • "boolean": "bool",
  • "float": "float",
  • "date": "str",
  • "object": "dict",
  • "password": "str",
  • "integer": "int",
  • "file": "dict"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mvtech-plugin-1.10.5.tar.gz (57.3 kB view details)

Uploaded Source

File details

Details for the file mvtech-plugin-1.10.5.tar.gz.

File metadata

  • Download URL: mvtech-plugin-1.10.5.tar.gz
  • Upload date:
  • Size: 57.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.2

File hashes

Hashes for mvtech-plugin-1.10.5.tar.gz
Algorithm Hash digest
SHA256 59cb6b6fd185bc21d1b5b64dec304338f84bb0a7890cbdd7b784bcc5b2035e81
MD5 ec07f956647a6d2d10353af6deb68b4f
BLAKE2b-256 6c1c7d1701facab45afee3acc55e96672efce2a2f66426d8b56e5794f3089a81

See more details on using hashes here.

Supported by

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