【文件属性】:
文件名称:microservice_example:微服务的示例以展示基于微服务的体系结构的各个方面
文件大小:16KB
文件格式:ZIP
更新时间:2021-04-30 01:58:26
Python
微服务示例
这是一个实现小型数据抽取微服务的示例项目。 该项目基于PrismFP的任务。
要求
PostgreSQL(包括开发包)
雷迪斯
的Python 3
另外,可选地:
纳吉奥斯
黎曼
建造
make clean && make
跑步
首先根据config/config.yaml提供配置文件config/config.yaml.example 。 它应该非常简单。
make run
部署中
make deploy
测验
make test
请求应用
就在POST这与application/json内容类型。
{
"jsonrpc" : "2.0" ,
"id" : 1 ,
"method" : "get_users" ,
"params" : [ ]
}
关于作业的备注
一般说明
该服务基于HTTP上的JSON-RPC 2.0标准。 我们可以
【文件预览】:
microservice_example-master
----microservice()
--------config.py(456B)
--------main.py(685B)
--------__init__.py(0B)
--------users.py(1KB)
--------components.py(697B)
----deploy.py(2KB)
----migrations()
--------1445890156-create-users.py(100B)
----main.py(209B)
----requirements.txt(228B)
----config()
--------config.yaml.example(478B)
----LICENSE(1KB)
----README.md(4KB)
----Makefile(351B)
----tests()
--------helpers.py(2KB)
--------__init__.py(0B)
--------resources()
--------test_users.py(3KB)
----misc()
--------riemann()
--------deploy.py(4KB)
--------__init__.py(0B)
--------nagios()
----.gitignore(748B)