Python API

The Solace PubSub+ Messaging API for Python (v1.0.0) can be used in cloud-based and enterprise-scale server applications. To use this API, we recommend that you have Python 3.6 or later installed. The Python, Node.js, and JavaScript Messaging APIs share the same asynchronous and non-blocking programming model, but are packaged differently, and optimized for their respective target environments.

Message Exchange Patterns

The Python API supports the following message exchange patterns:

  • Publish / Subscribe

 

For more information, see Message Exchange Patterns.

Features

The Python API supports:

  • Connection management to PubSub+ event brokers
  • Addition and removal of topic subscriptions
  • Sending and receiving Direct and Guaranteed Messages
  • Message compression
  • Use of Selectors

The Python API does not support the following features:

  • Request/Reply message exchange pattern
  • Message Replay
  • Structured data types that allow interoperability between various architectures and programming languages
  • PubSub+ Cache Client API support
  • Session Transactions
  • XA Transactions
  • Queue browsing
  • Kerberos authentication

Get Started

Tutorials are provided to help you quickly get up to speed developing applications using the Solace PubSub+ Messaging API for Python. As part of using Python, you might want to use an integrated development environment. To ensure the code hints work properly, you may need to configure your IDE settings. For more information, see Using an Integrated Development Environment.

Before you can start working with the API, you must have access to a PubSub+ event broker. For more information about PubSub+ event brokers, see Getting Started with PubSub+ Event Brokers.

Start Tutorials

Getting Started with PubSub+ Event Brokers

These are three ways to access a PubSub+ event broker:

  1. If you have PubSub+ event brokers already deployed, here's what you require:
    • the hostname or IP address of an event broker to test against
    • a username and password to access it
    • a Message VPN in which you can produce and consume messages
  2. You can go through an Initial Set Up of a software event broker.
  3. You can create an event broker service with the PubSub+ Cloud. See PubSub+ Event Broker: Cloud for more information.

Using an Integrated Development Environment

If you are using an Integrated Development Environment (IDE), such as PyCharm, integrated help is available provided you have Docstrings rendered as reStructuredText. In some IDEs, you configure this in the settings. For example, in PyCharm, you go to File > Settings >Tool > Python Integrated Tools, select reStructureText in the Docstring format list, and click Apply.

Python API Reference

Click below to access the API Reference for the Solace PubSub+ Messaging API for Python.

Python Reference

Python API Release Notes

Click below to download the latest release notes for the Solace PubSub+ Messaging API for Python.

Python API Release Notes