Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdb5a860

Browse files
committed
Bump v0.6.5
Signed-off-by: Vishal Rana <vr@labstack.com>
1 parent75309e7 commitdb5a860

File tree

3 files changed

+10
-7
lines changed

3 files changed

+10
-7
lines changed

‎labstack/client.py‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
importrequests
2-
from .connectimport_Connect
2+
from .queueimport_Queue
33
from .emailimport_Email
44
from .logimport_Log
55
from .storeimport_Store
@@ -19,8 +19,8 @@ def __init__(self, account_id, api_key):
1919
self.api_key=api_key
2020
self.interceptor=_Interceptor(api_key)
2121

22-
defconnect(self,client_id):
23-
return_Connect(self.account_id,self.api_key,client_id)
22+
defqueue(self,client_id):
23+
return_Queue(self.account_id,self.api_key,client_id)
2424

2525
defemail(self):
2626
return_Email(self.interceptor)

‎labstack/connect.py‎renamed to ‎labstack/queue.py‎

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
importpaho.mqtt.clientasmqtt
22

3-
class_Connect():
3+
class_Queue():
44
def__init__(self,account_id,api_key,client_id):
55
self.account_id=account_id
66
self.client=mqtt.Client(client_id=client_id,clean_session=True)
@@ -20,8 +20,11 @@ def on_message(client, userdata, msg):
2020
defpublish(self,topic,message):
2121
self.client.publish('{}/{}'.format(self.account_id,topic),message)
2222

23-
defsubscribe(self,topic):
24-
self.client.subscribe('{}/{}'.format(self.account_id,topic))
23+
defsubscribe(self,topic,shared=False):
24+
topic='{}/{}'.format(self.account_id,topic)
25+
ifshared:
26+
topic='$queue/'+topic
27+
self.client.subscribe(topic)
2528

2629
defdisconnect(self):
2730
self.client.disconnect()

‎setup.py‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
setup(
44
name='labstack',
5-
version='0.6.4',
5+
version='0.6.5',
66
description='Official Python client library for the LabStack platform',
77
long_description='`<https://github.com/labstack/labstack-python>`_',
88
keywords='labstack cube email log mqtt store',

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp