我是靠谱客的博主 鳗鱼小蝴蝶,这篇文章主要介绍python微服务框架_Nameko 是一个 Python 的微服务框架,现在分享给大家,希望可以做个参考。

Nameko

68747470733a2f2f7365637572652e7472617669732d63692e6f72672f6e616d656b6f2f6e616d656b6f2e7376673f6272616e63683d6d6173746572

[nah-meh-koh]

A microservices framework for Python that lets service developers concentrate on application logic and encourages testability.

A nameko service is just a class:

# helloworld.py

from nameko.rpc import rpc

class GreetingService:

name = "greeting_service"

@rpc

def hello(self, name):

return "Hello, {}!".format(name)

You can run it in a shell:

$ nameko run helloworld

starting services: greeting_service

...

And play with it from another:

$ nameko shell

>>> n.rpc.greeting_service.hello(name="ナメコ")

'Hello, ナメコ!'

Features

AMQP RPC and Events (pub-sub)

HTTP GET, POST & websockets

CLI for easy and rapid development

Utilities for unit and integration testing

Getting Started

Check out the documentation.

Support

For help, comments or questions, please go to .

For enterprise

Available as part of the Tidelift Subscription.

The maintainers of Nameko and thousands of other packages are working with Tidelift to deliver commercial support and maintenance for the open source dependencies you use to build your applications. Save time, reduce risk, and improve code health, while paying the maintainers of the exact dependencies you use. Learn more.

Security contact information

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Contribute

Fork the repository

Raise an issue or make a feature request

License

Apache 2.0. See LICENSE for details.

最后

以上就是鳗鱼小蝴蝶最近收集整理的关于python微服务框架_Nameko 是一个 Python 的微服务框架的全部内容,更多相关python微服务框架_Nameko内容请搜索靠谱客的其他文章。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(120)

评论列表共有 0 条评论

立即
投稿
返回
顶部