========
stomp.py
========
.. image:: https://badge.fury.io/py/stomp.py.svg
:target: https://badge.fury.io/py/stomp.py
:alt: PyPI version
"stomp.py" is a Python client library for accessing messaging servers (such as ActiveMQ_, Artemis_ or RabbitMQ_) using the STOMP_ protocol (`STOMP v1.0`_, `STOMP v1.1`_ and `STOMP v1.2`_). It can also be run as a standalone, command-line client for testing. NOTE: Stomp.py has officially ended support for Python2.x. See `python3statement.org`_ for more information.
.. contents:: \
:depth: 1
Quick Start
===========
You can connect to a message broker running on the local machine, and send a message using the following example.
.. code-block:: python
import stomp
conn = stomp.Connection()
conn.connect('admin', 'password', wait=True)
conn.send(body=' '.join(sys.argv[1:]), destination='/queue/test')
conn.disconnect()
Documentation and Resources
===========================
- `Main documentation`_
- `API documentation`_ (see `stomp.github.io`_ for details on the STOMP protocol itself)
- A basic example of using stomp.py with a message listener can be found in the `quick start`_ section of the main documentation
- Description of the `command-line interface`_
- `Travis`_ for continuous integration builds
- Current `test coverage report`_
- `PyPi stomp.py page`_
The current version of stomp.py supports:
- Python 3.x (Python2 support ended as of Jan 2020)
- STOMP version 1.0, 1.1 and 1.2
There is also legacy 3.1.7 version using the old 3-series code (see `3.1.7 on PyPi`_ and `3.1.7 on GitHub`_). This is no longer supported, but (at least as of 2018) there were still a couple of reports of this version still being used in the wild.
Note: stomp.py now follows `semantic versioning`_:
- MAJOR version for incompatible API changes,
- MINOR version for functionality added in a backwards compatible manner, and
- PATCH version for backwards compatible bug fixes.
Testing
=======
stomp.py has been perfunctorily tested on:
- Pivotal `RabbitMQ`_ (`test_rabbitmq.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_rabbitmq.py>`_)
- Apache `ActiveMQ`_ (`test_activemq.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_activemq.py>`_)
- Apache ActiveMQ `Artemis`_ (`test_artemis.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_artemis.py>`_)
- `stompserver`_ (`test_stompserver.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_stompserver.py>`_)
For testing locally, you'll need to install docker (or `podman`_). Once installed:
#. Install dependencies:
``poetry install``
#. Create the docker (or podman) image:
``make docker-image`` (or ``make podman-image``)
#. Run the container:
``make run-docker`` (or ``make run-podman``)
#. Run stomp.py unit tests:
``make test``
#. Cleanup the container afterwards if you don't need it any more:
``make remove-docker`` (or ``make remove-podman``)
If you want to connect to the test services locally (other than from the included tests), you'll want to add test domain names to your hosts file like so:
| 172.17.0.2 my.example.com
| 172.17.0.2 my.example.org
| 172.17.0.2 my.example.net
If you're using `podman`_ and you want to access services via their private IP addresses, you'll want to run your commands with::
podman unshare --rootless-netns <command>
so that <command> has access to the private container network. Service ports are also exposed to the host and can be accessed directly.
.. _`STOMP`: http://stomp.github.io
.. _`STOMP v1.0`: http://stomp.github.io/stomp-specification-1.0.html
.. _`STOMP v1.1`: http://stomp.github.io/stomp-specification-1.1.html
.. _`STOMP v1.2`: http://stomp.github.io/stomp-specification-1.2.html
.. _`python3statement.org`: http://python3statement.org/
.. _`Main documentation`: http://jasonrbriggs.github.io/stomp.py/index.html
.. _`stomp.github.io`: http://stomp.github.io/
.. _`quick start`: http://jasonrbriggs.github.io/stomp.py/quickstart.html
.. _`command-line interface`: http://jasonrbriggs.github.io/stomp.py/commandline.html
.. _`PyPi stomp.py page`: https://pypi.org/project/stomp.py/
.. _`API documentation`: http://jasonrbriggs.github.io/stomp.py/api.html
.. _`test coverage report`: http://jasonrbriggs.github.io/stomp.py/htmlcov/
.. _`Travis`: https://travis-ci.org/jasonrbriggs/stomp.py
.. _`3.1.7 on PyPi`: https://pypi.org/project/stomp.py/3.1.7/
.. _`3.1.7 on GitHub`: https://github.com/jasonrbriggs/stomp.py/tree/stomppy-3series
.. _`ActiveMQ`: http://activemq.apache.org/
.. _`Artemis`: https://activemq.apache.org/components/artemis/
.. _`RabbitMQ`: http://www.rabbitmq.com
.. _`stompserver`: http://stompserver.rubyforge.org
.. _`semantic versioning`: https://semver.org/
.. _`podman`: https://podman.io/
Raw data
{
"_id": null,
"home_page": "https://github.com/jasonrbriggs/stomp.py",
"name": "stomp.py",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.7",
"maintainer_email": null,
"keywords": "stomp, messaging, events, client",
"author": "Jason R Briggs",
"author_email": "jasonrbriggs@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/bc/66/c07f01feb5fbc669c4333c76eb02fb8149c653c25ba9769477f8427d5e55/stomp_py-8.2.0.tar.gz",
"platform": null,
"description": "========\nstomp.py\n========\n\n.. image:: https://badge.fury.io/py/stomp.py.svg\n :target: https://badge.fury.io/py/stomp.py\n :alt: PyPI version\n\n\"stomp.py\" is a Python client library for accessing messaging servers (such as ActiveMQ_, Artemis_ or RabbitMQ_) using the STOMP_ protocol (`STOMP v1.0`_, `STOMP v1.1`_ and `STOMP v1.2`_). It can also be run as a standalone, command-line client for testing. NOTE: Stomp.py has officially ended support for Python2.x. See `python3statement.org`_ for more information. \n\n.. contents:: \\ \n :depth: 1\n\n\nQuick Start\n===========\n\nYou can connect to a message broker running on the local machine, and send a message using the following example.\n\n.. code-block:: python\n\n import stomp\n\n conn = stomp.Connection()\n conn.connect('admin', 'password', wait=True)\n conn.send(body=' '.join(sys.argv[1:]), destination='/queue/test')\n conn.disconnect()\n\n\nDocumentation and Resources\n===========================\n\n- `Main documentation`_\n- `API documentation`_ (see `stomp.github.io`_ for details on the STOMP protocol itself)\n- A basic example of using stomp.py with a message listener can be found in the `quick start`_ section of the main documentation\n- Description of the `command-line interface`_\n- `Travis`_ for continuous integration builds\n- Current `test coverage report`_\n- `PyPi stomp.py page`_\n\nThe current version of stomp.py supports:\n\n- Python 3.x (Python2 support ended as of Jan 2020)\n- STOMP version 1.0, 1.1 and 1.2\n\nThere is also legacy 3.1.7 version using the old 3-series code (see `3.1.7 on PyPi`_ and `3.1.7 on GitHub`_). This is no longer supported, but (at least as of 2018) there were still a couple of reports of this version still being used in the wild.\n\nNote: stomp.py now follows `semantic versioning`_:\n\n- MAJOR version for incompatible API changes,\n- MINOR version for functionality added in a backwards compatible manner, and\n- PATCH version for backwards compatible bug fixes.\n\n\n\nTesting\n=======\n\nstomp.py has been perfunctorily tested on:\n\n- Pivotal `RabbitMQ`_ (`test_rabbitmq.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_rabbitmq.py>`_)\n- Apache `ActiveMQ`_ (`test_activemq.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_activemq.py>`_)\n- Apache ActiveMQ `Artemis`_ (`test_artemis.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_artemis.py>`_)\n- `stompserver`_ (`test_stompserver.py <https://github.com/jasonrbriggs/stomp.py/blob/dev/tests/test_stompserver.py>`_)\n\nFor testing locally, you'll need to install docker (or `podman`_). Once installed:\n\n#. Install dependencies:\n ``poetry install``\n#. Create the docker (or podman) image:\n ``make docker-image`` (or ``make podman-image``)\n#. Run the container:\n ``make run-docker`` (or ``make run-podman``)\n#. Run stomp.py unit tests:\n ``make test``\n#. Cleanup the container afterwards if you don't need it any more:\n ``make remove-docker`` (or ``make remove-podman``)\n\nIf you want to connect to the test services locally (other than from the included tests), you'll want to add test domain names to your hosts file like so:\n | 172.17.0.2 my.example.com\n | 172.17.0.2 my.example.org\n | 172.17.0.2 my.example.net\n\nIf you're using `podman`_ and you want to access services via their private IP addresses, you'll want to run your commands with::\n\n podman unshare --rootless-netns <command>\n\nso that <command> has access to the private container network. Service ports are also exposed to the host and can be accessed directly.\n\n\n.. _`STOMP`: http://stomp.github.io\n.. _`STOMP v1.0`: http://stomp.github.io/stomp-specification-1.0.html\n.. _`STOMP v1.1`: http://stomp.github.io/stomp-specification-1.1.html\n.. _`STOMP v1.2`: http://stomp.github.io/stomp-specification-1.2.html\n.. _`python3statement.org`: http://python3statement.org/\n\n.. _`Main documentation`: http://jasonrbriggs.github.io/stomp.py/index.html\n.. _`stomp.github.io`: http://stomp.github.io/\n.. _`quick start`: http://jasonrbriggs.github.io/stomp.py/quickstart.html\n.. _`command-line interface`: http://jasonrbriggs.github.io/stomp.py/commandline.html\n.. _`PyPi stomp.py page`: https://pypi.org/project/stomp.py/\n.. _`API documentation`: http://jasonrbriggs.github.io/stomp.py/api.html\n.. _`test coverage report`: http://jasonrbriggs.github.io/stomp.py/htmlcov/\n.. _`Travis`: https://travis-ci.org/jasonrbriggs/stomp.py\n\n.. _`3.1.7 on PyPi`: https://pypi.org/project/stomp.py/3.1.7/\n.. _`3.1.7 on GitHub`: https://github.com/jasonrbriggs/stomp.py/tree/stomppy-3series\n\n.. _`ActiveMQ`: http://activemq.apache.org/\n.. _`Artemis`: https://activemq.apache.org/components/artemis/\n.. _`RabbitMQ`: http://www.rabbitmq.com\n.. _`stompserver`: http://stompserver.rubyforge.org\n\n.. _`semantic versioning`: https://semver.org/\n\n.. _`podman`: https://podman.io/\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "Python STOMP client, supporting versions 1.0, 1.1 and 1.2 of the protocol",
"version": "8.2.0",
"project_urls": {
"Documentation": "http://jasonrbriggs.github.io/stomp.py/",
"Homepage": "https://github.com/jasonrbriggs/stomp.py",
"Repository": "https://github.com/jasonrbriggs/stomp.py"
},
"split_keywords": [
"stomp",
" messaging",
" events",
" client"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7bb6ebfd6daef0c19a5ca3ac1fb2fc092331d67af5a30c868f106fcc2504c287",
"md5": "c87c11bfd70e5de4d6a397897cfef187",
"sha256": "fad24e51b505996015a39ca1632df4e0225c1c552980955e21f2aebfc0d9d85c"
},
"downloads": -1,
"filename": "stomp_py-8.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c87c11bfd70e5de4d6a397897cfef187",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.7",
"size": 42751,
"upload_time": "2024-10-31T21:59:36",
"upload_time_iso_8601": "2024-10-31T21:59:36.658314Z",
"url": "https://files.pythonhosted.org/packages/7b/b6/ebfd6daef0c19a5ca3ac1fb2fc092331d67af5a30c868f106fcc2504c287/stomp_py-8.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bc66c07f01feb5fbc669c4333c76eb02fb8149c653c25ba9769477f8427d5e55",
"md5": "882cdff1e06d0636f2f1af0f80f14d3c",
"sha256": "9908689361e263bf198e6acfb3c4386759fb7df7d141f4384d7414771c68d7fc"
},
"downloads": -1,
"filename": "stomp_py-8.2.0.tar.gz",
"has_sig": false,
"md5_digest": "882cdff1e06d0636f2f1af0f80f14d3c",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.7",
"size": 39286,
"upload_time": "2024-10-31T21:59:38",
"upload_time_iso_8601": "2024-10-31T21:59:38.465704Z",
"url": "https://files.pythonhosted.org/packages/bc/66/c07f01feb5fbc669c4333c76eb02fb8149c653c25ba9769477f8427d5e55/stomp_py-8.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-31 21:59:38",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "jasonrbriggs",
"github_project": "stomp.py",
"travis_ci": true,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "atomicwrites",
"specs": [
[
"==",
"1.4.1"
]
]
},
{
"name": "attrs",
"specs": [
[
"==",
"22.1.0"
]
]
},
{
"name": "colorama",
"specs": [
[
"==",
"0.4.5"
]
]
},
{
"name": "coverage",
"specs": [
[
"==",
"6.2"
]
]
},
{
"name": "docopt",
"specs": [
[
"==",
"0.6.2"
]
]
},
{
"name": "importlib-metadata",
"specs": [
[
"==",
"4.8.3"
]
]
},
{
"name": "iniconfig",
"specs": [
[
"==",
"1.1.1"
]
]
},
{
"name": "packaging",
"specs": [
[
"==",
"21.3"
]
]
},
{
"name": "pluggy",
"specs": [
[
"==",
"1.0.0"
]
]
},
{
"name": "py",
"specs": [
[
"==",
"1.11.0"
]
]
},
{
"name": "pyparsing",
"specs": [
[
"==",
"3.0.7"
]
]
},
{
"name": "pytest",
"specs": [
[
"==",
"7.0.1"
]
]
},
{
"name": "pytest-cov",
"specs": [
[
"==",
"3.0.0"
]
]
},
{
"name": "pytest-html",
"specs": [
[
"==",
"3.1.1"
]
]
},
{
"name": "pytest-metadata",
"specs": [
[
"==",
"1.11.0"
]
]
},
{
"name": "pytest-mock",
"specs": [
[
"==",
"3.6.1"
]
]
},
{
"name": "pytest-ordering",
"specs": [
[
"==",
"0.6"
]
]
},
{
"name": "tomli",
"specs": [
[
"==",
"1.2.3"
]
]
},
{
"name": "typing-extensions",
"specs": [
[
"==",
"4.1.1"
]
]
},
{
"name": "websocket-client",
"specs": [
[
"==",
"1.3.1"
]
]
},
{
"name": "zipp",
"specs": [
[
"==",
"3.19.1"
]
]
}
],
"lcname": "stomp.py"
}