Supports Python 3.4 and above
Download/install Yalgaar SDK into your machine.
pip install pyYalgaar OR python -m pip install pyYalgaar
Import Yalgaar SDK into your program.
from yalgaar import Yalgaar
To connect to a Yalgaar client,use following method, it must have valid Client Key.
objYalgaar = Yalgaar() objYalgaar.yalgaarConnect(clientKey, isSecure, connectionCallback, uuid = None, aesType = None, aesKey = None)
Here thread is created to process the network data. You can call objYalgaar.loop_forever() or objYalgaar.loop() continuously in your application if you don’t want to create a thread.
To publish message, use following method
To subscribe message, use following method.
objYalgaar.yalgaarSubscribe(channel/channels, SubscribeReturnMessageCallback, PresenceMessageCallback, ErrorMsgCallback)
To unsubscribe message,use following method.
To get list of all users subscribed with specific channel name, use following method.
objYalgaar.yalgaarUserList(Channel, UserListCallback, ErrorMsgCallback)
To get list of all channels subscribed by specified user, use following method.
objYalgaar.yalgaarChannelList(UUID, ChannelListCallback, ErrorMsgCallback)
To get the already published messages, use following method
objYalgaar.yalgaarHistory(channel, MessageCount, HistoryMessageCallback, ErrorMsgCallback)
from yalgaar import Yalgaar def on_connect(code, error_str): print(error_str) def on_message(topic, data): print(data) def on_presence(data): print(data) def on_error(data): print(data) objYalgaar = Yalgaar() objYalgaar.yalgaarConnect('ClientKey', False, on_connect, None, None, None) objYalgaar.yalgaarSubscribe('YourChannel', on_message, on_presence, on_error) objYalgaar.yalgaarPublish('YourChannel', 'This is Yalgaar Python SDK Example') objYalgaar.loop_forever() #following code can also be used instead of loop_forever API. while True: objYalgaar.loop()
At SYSTEM LEVEL SOLUTIONS, we understand that privacy is an important issue for visitors to the SYSTEM LEVEL SOLUTIONS Web site www.slscorp.com. The following information is designed to help visitors understand what information we gather from our site, and how we handle the information once we gather it.
SYSTEM LEVEL SOLUTIONS is the sole owner of any information collected on this site. We will not sell, share, or rent this information to others in ways different from what is disclosed in this statement. SYSTEM LEVEL SOLUTIONS may collect information from users at several different points on our website. SYSTEM LEVEL SOLUTIONS may transfer the information collected to any relevant unit within SYSTEM LEVEL SOLUTIONS located anywhere in the world.
If a user contacts SYSTEM LEVEL SOLUTIONS with a general enquiry, the user may provide SYSTEM LEVEL SOLUTIONS with personal information (for example contact details). SYSTEM LEVEL SOLUTIONS will use this personal information to respond to the enquiry and track further correspondence. Information is also used to compile statistics on response handling, etc. This is done in aggregate, and no individual names or other personal information are retained. Personal information collected is not used for any other purpose.
We request information from the user on our feedback/grievance form. Here a user must provide contact information (like name and address) as well as the details as requested in the form. This information is used for studying the feedback/grievance provided by the customer/visitor and passing on the information to the concerned division/department for appropriate action at their end. If we have trouble processing the data, the contact information provided is used to get in touch with the user.
We may partner with another party to provide specific services. When the user signs up for these services, we will share names, or other contact information that is necessary for the third party to provide these services. These parties are not allowed to use personally identifiable information except for the purpose of providing these services.
This web site may contain links to other sites. Please be aware that SYSTEM LEVEL SOLUTIONS is not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects personally identifiable information. This privacy statement applies solely to information collected by this Web site.