[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [paho-dev] Website updates
|
Hi Nick,
How about this?
I've changed m2m.eclipse.org to iot.eclipse.org - we should make that
change universally.
Cheers,
Roger
On Wed, Mar 19, 2014 at 9:02 PM, Nicholas O'Leary <nick.oleary@xxxxxxxxx> wrote:
> Hello Paho Committers.
>
> I've now pushed the new website to: http://eclipse.org/paho/new
>
> I have done the page for the JS client to get the ball rolling - but will
> need input from the rest of you for the other clients/utilities we have.
>
> You can see the list of clients/utilities that I was aware of when I put the
> new page together a month ago -
> http://eclipse.org/paho/new/#getting-started. Looking at the list now I see
> ObjC client is missing - any others that need to be there?
>
> We need, at a bare minimum, a place holder page for everything we have that
> includes:
> - a link to its source repository
> - where appropriate, how to build it
> - a minimal hello world example
>
> Over time, we can flesh out these pages with more content as is appropriate
> for each one. But I don't want the desire to create comprehensive pages get
> in the way of getting something up.
>
> I'm leaving it to the logical 'owners' of each client/utility to step up and
> add their page. I would like to get them done in the next two weeks - please
> can you reply to this mail to identify which pages you're signing up to do.
> That way we can figure out the gaps and get them covered.
>
>
> Thanks,
> Nick
>
>
> On 4 February 2014 08:12, Roger Light <roger@xxxxxxxxxx> wrote:
>>
>> Hi Nick,
>>
>> I think it's a definite improvement.
>>
>> As much as a memo for myself, standard pydoc generated html can be
>> obtained using:
>>
>> pydoc -w <path/to/client.py>
>>
>> This produces... interesting results:
>> http://h.ral.me/python/client.html that don't *quite* :) fit in with
>> your theme and, hurrah, doesn't make use of CSS (there is an open bug
>> on the issue here: http://bugs.python.org/issue10716 )
>>
>> Cheers,
>>
>> Roger
>>
>>
>> On Sat, Feb 1, 2014 at 11:17 PM, Nicholas O'Leary <nick.oleary@xxxxxxxxx>
>> wrote:
>> > Hi,
>> >
>> > as mentioned on the Paho call recently, I've begun working on a refresh
>> > of
>> > the Paho website.
>> >
>> > The intention is to have dedicated pages for each component that
>> > includes
>> > download links, getting-started guides, how-to build etc - something
>> > that is
>> > long overdue.
>> >
>> > I'll be looking to the owners of each component to help out once I've
>> > got a
>> > bit more of it in place. The goal is for consistency. I'm not so worried
>> > about getting auto-generated client docs looking the same (is the
>> > pydoc/jsdoc/javadoc stuff) but at the very least the landing pages for
>> > the
>> > clients need to be consistent in look and content.
>> >
>> > I am still working on an example component page (based on the JavaScript
>> > client, hence the rabbit hole of refactoring I emailed about earlier),
>> > but I
>> > have updated the main page. You can see it here:
>> > http://foo.knolleary.net/paho/
>> >
>> > Let me know what you think.
>> >
>> >
>> > Nick
>> >
>> >
>> > _______________________________________________
>> > paho-dev mailing list
>> > paho-dev@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/paho-dev
>> >
>> _______________________________________________
>> paho-dev mailing list
>> paho-dev@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/paho-dev
>
>
>
> _______________________________________________
> paho-dev mailing list
> paho-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/paho-dev
>
Title:
Paho - Open Source messaging for M2M
_javascript_ Client
The Paho Python Client provides a client class with support for both MQTT v3.1 and v3.1.1 on Python 2.7 or 3.x. It also provides some helper functions to make publishing one off messages to an MQTT server very straightforward.
Source
http://git.eclipse.org/c/paho/org.eclipse.paho.mqtt.python.git/
Download
The Python client can be downloaded and installed from PyPI using the pip
tool:
pip install paho-mqtt
Building from source
The project can be installed from the repository as well. To do this:
.
git clone http://git.eclipse.org/gitroot/paho/org.eclipse.paho.mqtt.python.git
cd org.eclipse.paho.mqtt.python.git
python setup.py install
The final step may need to be run with sudo
if you are using Linux or similar system.
Documentation
Getting Started
There are example clients in the examples directory of the repository.
Here is a very simple example that subscribes to the broker $SYS topic tree and prints out the resulting messages:
import paho.mqtt.client as mqtt
# The callback for when the client receives a CONNACK response from the server.
def on_connect(client, userdata, rc):
print("Connected with result code "+str(rc))
# Subscribing in on_connect() means that if we lose the connection and
# reconnect then subscriptions will be renewed.
client.subscribe("$SYS/#")
# The callback for when a PUBLISH message is received from the server.
def on_message(client, userdata, msg):
print(msg.topic+" "+str(msg.payload))
client = mqtt.Client()
client._on_connect_ = on_connect
client._on_message_ = on_message
client.connect("iot.eclipse.org", 1883, 60)
# Blocking call that processes network traffic, dispatches callbacks and
# handles reconnecting.
# Other loop*() functions are available that give a threaded interface and a
# manual interface.
client.loop_forever()