Python Clients

General purpose clients ? Currently strewn all over the place ... need to collect here or maybe links to them.

Some servers have client libraries ?



“” is a Python client library for accessing messaging servers (such as ActiveMQ, Apollo or RabbitMQ) using the STOMP protocol (versions 1.0, 1.1 and 1.2). It can also be run as a standalone, command-line client for testing.












Zero MQ

Official Python bindings -

Python examples

One of the first things to understand about ZeroMQ is that it's not a message broker like you might assume from its name. ZeroMQ is a library that supports certain network communication patterns using sockets ...

ZeroMQ uses queues internally to buffer messages so that you don't block your application when sending data. When you say socket.send(...), ZeroMQ actually enqueues a message to be sent later by a dedicated communication thread.

Without further ado, here’s a basic pub-sub message broker in Python using ZeroMQ, that demonstrates how little is required to get up and running:

... I will show how to design and implement a messaging layer with ZeroMQ. For the code example I will use Brian Granger’s PyZMQ, which is the excellent Python binding to ZeroMQ.

This package contains Python bindings for ØMQ. ØMQ is a lightweight and fast messaging implementation.

Is both client and server.

Tons of examples -

See Messaging#ZeroMQ, PythonServers#ZeroMQ


See Messaging#MQTT


This code provides a client class which enable applications to connect to an MQTT broker to publish messages, and to subscribe to topics and receive published messages. It also provides some helper functions to make publishing one off messages to an MQTT server very straightforward ...

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, flags, 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.

# 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("", 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.

The Paho project provides open-source client implementations of open and standard messaging protocols aimed at new, existing, and emerging applications for Machine‑to‑Machine (M2M) and Internet of Things (IoT).

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.

Mosqitto MQTT Client

A small Python program connects to the broker and subscribes to a few topics:

Lots of general articles about messaging

#!/usr/bin/env python

import mosquitto

def on_message(mosq, obj, msg):
    print "%-20s %d %s" % (msg.topic, msg.qos, msg.payload)

    mosq.publish('pong', "Thanks", 0)

def on_publish(mosq, obj, mid):

cli = mosquitto.Mosquitto()
cli.on_message = on_message
cli.on_publish = on_publish


cli.connect("hippo", 1883, 60)

cli.subscribe("dns/all", 0)
cli.subscribe("nagios/#", 0)

while cli.loop() == 0:


Basic authentication

Creating directories, removing directories and files

Uploading and downloading files

Directory listing

Support for client side SSL certificates

Tiny, no external dependencies. Latest release 2014.

No release 5 years.

This project aims to provide an object-oriented Python WebDAV client-side library based on Pythons standard httplib and Greg Steins davlib. The client shall fully support RFCs 4918 (basic specification), 3744 (access control), and 3253 (versioning).

Recommended, but 2012 ?

2009 ???

Hablo Russki ???

This library provides a WebDAV client including ACP and searching support.

2012 ?

2006 !!''

An easy-to-use HTTP and WebDAV client library.

This is a small library for contacting HTTP and WebDAV servers. Goal of this project until version 1.0 is supporting all WebDAV methods including the versioning extensions from RFC 3253).


Support for REPORT method (verion-tree and expand-property, RFC 3253)
Multipart/form-data and application/x-www-form-urlencoded POST requests

This version requires Python 2.5 or later (including Python 3.)

Apparently current, says 2015, but actually last release is 2012.

Downloads form 2012, but apparently the most usable.


Still not sure about using Samba as a major component for PyWacket integration, more like find an alternative solution for the File Server functional slot.

Maybe 'reverse engineer' a functional replacement that works with existing Python Samba clients ... is anybody using them in the first place ?

See Servers#SambaServer.

This is a set of Python bindings for the libsmbclient library from the samba project.

pysmb is an experimental SMB/CIFS library written in Python. It implements the client-side SMB/CIFS protocol which allows your Python application to access and transfer files to/from SMB/CIFS shared folders like your Windows file sharing and Samba folders.

PySMB Documentation -

pysmb is a pure Python implementation of the client-side SMB/CIFS protocol (SMB1 and SMB2) which is the underlying protocol that facilitates file sharing and printing between Windows machines, as well as with Linux machines via the Samba server application.

pysmb is developed in Python 2.4.6, Python 2.7.1 and Python 3.2.3 and has been tested against shared folders on Windows XP SP3, Windows Vista, Windows 7 and Samba 3.x.

amba is an implementation of the SMB/CIFS protocol for Unix systems, providing support for cross-platform file sharing with Microsoft Windows, OS X, and other Unix systems. Samba can also function as a domain controller or member server in both NT4-style and Active Directory domains.

This package contains Python bindings for most Samba libraries.

PySamba? is a full wrapper based in the work of Tim Potter. PySamba? is built as a Python C extension and a Python module that hides the complexity of the lower layer (smb). At now, PySamba? provides a fully functional samba wrapper

What is it ?

Also See

PyPubSub provides a publish - subscribe API that facilitates the development of event-based (also known as message-based) applications.

PyPubSub supports sending and receiving messages between objects of an application, as well as a variety of advanced features that facilitate debugging and maintaining topics and messages in larger applications.

See PythonServers

Last modified 3 years ago Last modified on 05/15/2015 05:35:01 PM