Skip to content

Commit

Permalink
add travis ci
Browse files Browse the repository at this point in the history
  • Loading branch information
AloneFire committed Nov 19, 2018
1 parent cd87af8 commit 4385a70
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 25 deletions.
14 changes: 14 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: python
python:
- '3.6'
install:
- pip install -r requirements.txt
deploy:
provider: pypi
user: alonefire
password:
secure: BPLKjhVDFMMNhBRldD1IMzbxSl0hq+MAH+5JXLIiTxENtItbQOqjcJAmyOxRCS0YahJhWPvoS7PlkvnoyV+aoOh4H57aGixO4MzgT2P10EYJF9h5lydfUV7O9j1NIQQtzrJglYg7y7PzfudnyX2KXYGT+TTf9wrVyEyjO9mUblkMiuFD9WW3cHsm1LGfswQjJn0Ae8r3+Si5LoLGvFRhMQaEh/1suwLD66RhmuVvauFqv6v1cmQdovLsbduYReh0g/mpLP1Y4DQagYrds06r7B+DnAW6U3469/SZ5bWDXTj9ew8228vx3GAN39WXeuS1qAXiV3K2quLS3TJAsl6AaA8lcOv7lGhQkaagrvRzDYIu2tjMtu5OmBJGN7vp0O1g/X8b801XKflSxbwQtjb/gR4VfrUzwUOxuxWapkvJ/rGyDoLLIYUF2sJwVjr51+bZ0igJAJ+Tq2tzjqNK1OaxLl5bgd9e6ZEVlFCpkI+ZDOeIkSZJVBUqoi5eUcB4+jo4K3s58Na9HXBTrEsJrSmQogRFLjxmMmM4pauyBZnQLBW3VMWTcHjC/3kqZ7/TS2gWCTKiq69Y0BqgICVA6lOrBb+qpPJd8pj0ejWK/lYHk1mW7WUMLAEeWNOl+MA1dy6U1SERlkPBBli+GyPFXSl6za/AgVNePdLQ2fVaaI7O8gA=
on:
python: 3.6
tags: true
branch: master
43 changes: 18 additions & 25 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# flask-hsrpc (http simple rpc)
> 简化接口路由、接口文档、请求参数自动验证、统一响应、日志、服务注册及自动发现等一体化flask插件

> 简化接口路由、接口文档、请求参数自动验证、统一响应、日志、服务注册及自动发现等一体化 flask 插件
## 安装

Expand All @@ -9,29 +10,21 @@ pip install flask-hsrpc
pip install --upgrade flask-hsrpc
```


## 配置

| 配置项 | 描述 |
|------------------|------------------|
| APP_NAME | 服务名,用于文档展示,及服务注册 |
| APP_VERSION | 服务版本号,用于文档展示 |
| APP_DESC | 服务描述,用于文档展示 |
| SERVICE_INFO | 服务注册信息 |
| SERVICE_INFO.service_id | 服务ID,每个实例唯一(没有则会自动生成) |
| SERVICE_INFO.address | 服务所在IP |
| SERVICE_INFO.port | 服务端口 |
| SERVICE_INFO.check | 服务健康检查配置 |
| CONSUL_HOST | 注册consul服务IP,默认 127.0.0.1 |
| CONSUL_PORT | 注册consul端口,默认 8500 |
| HSRPC_AUTO_UNREGISTER | 服务停止后自动注销服务 |
| LOGGER_FORMAT | 日志格式 |
| LOGGER_FILENAME | 日志文件名 |
| LOGGER_LEVEL | 日志输出级别 |


## PYPI 打包上传

```
python setup.py sdist upload -r
```
| 配置项 | 描述 |
| ----------------------- | --------------------------------------- |
| APP_NAME | 服务名,用于文档展示,及服务注册 |
| APP_VERSION | 服务版本号,用于文档展示 |
| APP_DESC | 服务描述,用于文档展示 |
| SERVICE_INFO | 服务注册信息 |
| SERVICE_INFO.service_id | 服务 ID,每个实例唯一(没有则会自动生成) |
| SERVICE_INFO.address | 服务所在 IP |
| SERVICE_INFO.port | 服务端口 |
| SERVICE_INFO.check | 服务健康检查配置 |
| CONSUL_HOST | 注册 consul 服务 IP,默认 127.0.0.1 |
| CONSUL_PORT | 注册 consul 端口,默认 8500 |
| HSRPC_AUTO_UNREGISTER | 服务停止后自动注销服务 |
| LOGGER_FORMAT | 日志格式 |
| LOGGER_FILENAME | 日志文件名 |
| LOGGER_LEVEL | 日志输出级别 |

0 comments on commit 4385a70

Please sign in to comment.