Query extension for nameko.
Project description
Nameko extension for support of running queries.
Queries supports multiple replies for a single query sent and will be returned as a list.
Examples
from nameko_query.responder import query_responder
class BlockedListener(object):
name = "service"
routing_prefix = "service"
@query_responder
def method(self, parameters, message):
return "hello world"
from nameko_query.request import ClusterQueryProxy
def query_request(service_name, method_name, parameters={}):
with ClusterQueryProxy({"AMQP_URI": "amqp://guest:guest@localhost", timeout=0.05) as cluster_query:
service = getattr(cluster_query, service_name)
method = getattr(service, method_name)
return method(parameters)
print query_request("service", "method", parameters)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
Close
Hashes for nameko_query-0.0.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd10e82a2b49a51f8e050db0c29c7a1b39b624daeff9dea421e994b8072aada5 |
|
MD5 | ff92ebbf71d8d275cf38889763d77141 |
|
BLAKE2b-256 | 8cda74fc43a16afa9e333270c1e9735dc8f84e69e69587132f3ece6f76f1e5de |
Close
Hashes for nameko_query-0.0.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8bf799517b9eca2bbc9c8f55a28bb1c285d3cc55e28527a521500079d24c4a63 |
|
MD5 | 1487fcfdee5b956c4315c31f21d69ad4 |
|
BLAKE2b-256 | 4fb4aa0d9f22ae6e90760cb2a7d314f14910fce031d9d7053b7100b0d23abe5b |