用于神秘游戏的微服务处理程序
microservicecryp的Python项目详细描述
python3库
神秘游戏Python3的微服务库。
皮皮塞特:https://pypi.org/project/cryptic-game/
安装:
$ pip3 install cryptic-game
快速启动
fromcrypticimportMicroServicems:MicroService=MicroService(name="echo")@ms.microservice_endpoint(path=["microservice"])defhandle(data:dict,microservice:str):print(data,microservice)return{}@ms.user_endpoint(path=["user"])defhandle(data:dict,user:str):print(data,user)return{}if__name__=='__main__':ms.run()
要求
必需的是requirements.txt
中的所有模块。
测试一下!
您的微服务将由game-server of cryptic支持。
环境变量
key | default value |
---|---|
SERVER_HOST | 127.0.0.1 |
SERVER_PORT | 1239 |
维基
有关详细信息,请访问我们的wiki。