==============
riemann-client
==============
.. image:: http://img.shields.io/pypi/v/riemann-client.svg
:target: https://pypi.python.org/pypi/riemann-client
.. image:: http://img.shields.io/pypi/l/riemann-client.svg
:target: https://pypi.python.org/pypi/riemann-client
.. image:: http://img.shields.io/travis/borntyping/python-riemann-client/master.svg
:target: https://travis-ci.org/borntyping/python-riemann-client
|
A `Riemann <http://riemann.io/>`_ client library and command line tool for
Python. It supports UDP and TCP transports, queries, and all metric types.
The client library aims to provide a simple, minimal API, and does not
require direct interaction with protocol buffers. There is also a queued
client that can queue or batch events and then send them in a single message.
* `Source on GitHub <https://github.com/borntyping/python-riemann-client>`_
* `Documentation on Read the Docs <http://riemann-client.readthedocs.org/en/latest/>`_
* `Packages on PyPI <https://pypi.python.org/pypi/riemann-client>`_
**This project is no longer maintained. Please contact me by opening an issue
on the GitHub project if you'd like to fork this repository and take over the
``riemann-client`` PyPI package.**
Usage
-----
As a command line tool::
riemann-client [--host HOST] [--port PORT] send [-s SERVICE] [-S STATE] [-m METRIC] [...]
riemann-client [--host HOST] [--port PORT] query QUERY
The host and port used by the command line tool can also be set with the
``RIEMANN_HOST`` and ``RIEMANN_PORT`` environment variables. By default,
``localhost:5555`` will be used.
As a library::
import riemann_client.client
with riemann_client.client.Client() as client:
client.event(service="riemann-client", state="awesome")
client.query("service = 'riemann-client'")
A more detailed example, using both a non-default transport and a queued
client::
from riemann_client.transport import TCPTransport
from riemann_client.client import QueuedClient
with QueuedClient(TCPTransport("localhost", 5555)) as client:
client.event(service="one", metric_f=0.1)
client.event(service="two", metric_f=0.2)
client.flush()
The ``QueuedClient`` class modifies the ``event()`` method to add events to a
queue instead of immediately sending them, and adds the ``flush()`` method to
send the current event queue as a single message.
Installation
------------
``riemann-client`` requires Python 2.6 or above, and can be installed with
``pip install riemann-client``. It will use Google's `protobuf`_ library when
running under Python 2, and `GreatFruitOmsk`_'s `protobuf-py3`_ fork when
running under Python 3. Python 3 support is experimental and is likely to use
Google's `protobuf` once it supports Python 3 fully.
.. _protobuf: https://pypi.python.org/pypi/protobuf
.. _GreatFruitOmsk: https://github.com/GreatFruitOmsk
.. _protobuf-py3: https://pypi.python.org/pypi/protobuf-py3
Requirements
^^^^^^^^^^^^
* `click <http://click.pocoo.org/>`_
* `protobuf`_ (when using Python 2)
* `protobuf-py3`_ (when using Python 3)
Testing (Linux/OSX)
-------------------
Testing is done with `tox`_::
tox
.. _tox: https://tox.readthedocs.org/en/latest/
Changelog
---------
Version 6.1.3
^^^^^^^^^^^^^
* Added ``--echo/--no-echo`` option to the CLI.
Version 6.1.2
^^^^^^^^^^^^^
* Fixed tests inclusion in tarball.
Version 6.1.1
^^^^^^^^^^^^^
* Fixed socket error handling in ``riemann_client.client.AutoFlushingQueuedClient``.
Version 6.1.0
^^^^^^^^^^^^^
* ``riemann_client.client.AutoFlushingQueuedClient`` added.
Version 6.0.0
^^^^^^^^^^^^^
* ``riemann_client.client.Client.create_dict`` only returns event fields that
are set on the Protocol Buffers ``Event`` object
* ``riemann-client send ...`` only outputs fields that were set on the message
Version 5.1.0
^^^^^^^^^^^^^
* Added Python 3 support
* Changed ``riemann_client.riemann_pb2`` to wrap ``_py2`` and ``_py3`` modules
* Changed ``setup.py`` to dynamically select a ``protobuf`` dependency
Version 5.0.x
^^^^^^^^^^^^^
* Added API documentation (http://riemann-client.readthedocs.org/)
* Replaced ``argparse`` with ``click`` for an improved CLI
* Various command line parameters changed
* ``--event-host`` became ``--host``
* ``--print`` was removed, ``send`` always prints the sent event
* Minor fixes to ``QueuedClient`` API
* ``UDPTransport.send`` returns ``None`` instead of ``NotImplemented``
Version 4.2.x
^^^^^^^^^^^^^
* Added ``events()`` and ``send_events()`` methods to the client
* Added ``clear_queue()`` method to the queued client
* Add ``--timeout`` option for TCP based transports
Version 4.1.x
^^^^^^^^^^^^^
* Full Riemann protocol support (TLS transport, event attributes)
* Fixes for multiple broken features (``--tags``, ``--print``)
* Raise errors when clients are used incorrectly
* Client displays errors from Riemann nicely
* Relaxed version requirements to fit CentOS 6 packages
Version 3.0.x
^^^^^^^^^^^^^
* Renamed module from ``riemann`` to ``riemann_client``
* Command line interface was rewritten, and is now the only part of the library
that respects the ``RIEMANN_HOST`` and ``RIEMANN_PORT`` environment variables
* Support for querying the Riemann index was added
* Internally, transports now define ``send`` instead of ``write``, and
``TCPTransport.send`` returns Riemann's response message
Licence
-------
``riemann-client`` is licensed under the `MIT Licence`_. The protocol buffer
definition is sourced from the `Riemann Java client`_, which is licensed under
the `Apache Licence`_.
.. _MIT Licence: http://opensource.org/licenses/MIT
.. _Riemann Java client: https://github.com/aphyr/riemann-java-client/blob/0c4a1a255be6f33069d7bb24d0cc7efb71bf4bc8/src/main/proto/riemann/proto.proto
.. _Apache Licence: http://www.apache.org/licenses/LICENSE-2.0
Authors
-------
``riemann-client`` was written by `Sam Clements
<https://github.com/borntyping>`_, while working at `DataSift
<https://github.com/datasift>`_.
.. image:: https://0.gravatar.com/avatar/8dd5661684a7385fe723b7e7588e91ee?d=https%3A%2F%2Fidenticons.github.com%2Fe83ef7586374403a328e175927b98cac.png&r=x&s=40
.. image:: https://1.gravatar.com/avatar/a3a6d949b43b6b880ffb3e277a65f49d?d=https%3A%2F%2Fidenticons.github.com%2F065affbc170e2511eeacb3bd0e975ec1.png&r=x&s=40
Raw data
{
"_id": null,
"home_page": "https://github.com/borntyping/python-riemann-client",
"name": "riemann-client",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "",
"author": "Sam Clements",
"author_email": "sam.clements@datasift.com",
"download_url": "https://files.pythonhosted.org/packages/94/bf/2fc38b4ad14dcb343ea5b73f1a1f12c3e5a5cc4382a88ecf2f2cc942f668/riemann-client-7.0.0.tar.gz",
"platform": null,
"description": "==============\nriemann-client\n==============\n\n.. image:: http://img.shields.io/pypi/v/riemann-client.svg\n :target: https://pypi.python.org/pypi/riemann-client\n\n.. image:: http://img.shields.io/pypi/l/riemann-client.svg\n :target: https://pypi.python.org/pypi/riemann-client\n\n.. image:: http://img.shields.io/travis/borntyping/python-riemann-client/master.svg\n :target: https://travis-ci.org/borntyping/python-riemann-client\n\n|\n\nA `Riemann <http://riemann.io/>`_ client library and command line tool for\nPython. It supports UDP and TCP transports, queries, and all metric types.\nThe client library aims to provide a simple, minimal API, and does not\nrequire direct interaction with protocol buffers. There is also a queued\nclient that can queue or batch events and then send them in a single message.\n\n* `Source on GitHub <https://github.com/borntyping/python-riemann-client>`_\n* `Documentation on Read the Docs <http://riemann-client.readthedocs.org/en/latest/>`_\n* `Packages on PyPI <https://pypi.python.org/pypi/riemann-client>`_\n\n**This project is no longer maintained. Please contact me by opening an issue\non the GitHub project if you'd like to fork this repository and take over the\n``riemann-client`` PyPI package.**\n\nUsage\n-----\n\nAs a command line tool::\n\n riemann-client [--host HOST] [--port PORT] send [-s SERVICE] [-S STATE] [-m METRIC] [...]\n riemann-client [--host HOST] [--port PORT] query QUERY\n\nThe host and port used by the command line tool can also be set with the\n``RIEMANN_HOST`` and ``RIEMANN_PORT`` environment variables. By default,\n``localhost:5555`` will be used.\n\nAs a library::\n\n import riemann_client.client\n\n with riemann_client.client.Client() as client:\n client.event(service=\"riemann-client\", state=\"awesome\")\n client.query(\"service = 'riemann-client'\")\n\nA more detailed example, using both a non-default transport and a queued\nclient::\n\n from riemann_client.transport import TCPTransport\n from riemann_client.client import QueuedClient\n\n with QueuedClient(TCPTransport(\"localhost\", 5555)) as client:\n client.event(service=\"one\", metric_f=0.1)\n client.event(service=\"two\", metric_f=0.2)\n client.flush()\n\nThe ``QueuedClient`` class modifies the ``event()`` method to add events to a\nqueue instead of immediately sending them, and adds the ``flush()`` method to\nsend the current event queue as a single message.\n\nInstallation\n------------\n\n``riemann-client`` requires Python 2.6 or above, and can be installed with\n``pip install riemann-client``. It will use Google's `protobuf`_ library when\nrunning under Python 2, and `GreatFruitOmsk`_'s `protobuf-py3`_ fork when\nrunning under Python 3. Python 3 support is experimental and is likely to use\nGoogle's `protobuf` once it supports Python 3 fully.\n\n.. _protobuf: https://pypi.python.org/pypi/protobuf\n.. _GreatFruitOmsk: https://github.com/GreatFruitOmsk\n.. _protobuf-py3: https://pypi.python.org/pypi/protobuf-py3\n\nRequirements\n^^^^^^^^^^^^\n\n* `click <http://click.pocoo.org/>`_\n* `protobuf`_ (when using Python 2)\n* `protobuf-py3`_ (when using Python 3)\n\nTesting (Linux/OSX)\n-------------------\n\nTesting is done with `tox`_::\n\n tox\n\n.. _tox: https://tox.readthedocs.org/en/latest/\n\nChangelog\n---------\nVersion 6.1.3\n^^^^^^^^^^^^^\n\n* Added ``--echo/--no-echo`` option to the CLI.\n\nVersion 6.1.2\n^^^^^^^^^^^^^\n\n* Fixed tests inclusion in tarball.\n\nVersion 6.1.1\n^^^^^^^^^^^^^\n\n* Fixed socket error handling in ``riemann_client.client.AutoFlushingQueuedClient``.\n\nVersion 6.1.0\n^^^^^^^^^^^^^\n\n* ``riemann_client.client.AutoFlushingQueuedClient`` added.\n\nVersion 6.0.0\n^^^^^^^^^^^^^\n\n* ``riemann_client.client.Client.create_dict`` only returns event fields that\n are set on the Protocol Buffers ``Event`` object\n* ``riemann-client send ...`` only outputs fields that were set on the message\n\nVersion 5.1.0\n^^^^^^^^^^^^^\n\n* Added Python 3 support\n* Changed ``riemann_client.riemann_pb2`` to wrap ``_py2`` and ``_py3`` modules\n* Changed ``setup.py`` to dynamically select a ``protobuf`` dependency\n\nVersion 5.0.x\n^^^^^^^^^^^^^\n\n* Added API documentation (http://riemann-client.readthedocs.org/)\n* Replaced ``argparse`` with ``click`` for an improved CLI\n* Various command line parameters changed\n* ``--event-host`` became ``--host``\n* ``--print`` was removed, ``send`` always prints the sent event\n* Minor fixes to ``QueuedClient`` API\n* ``UDPTransport.send`` returns ``None`` instead of ``NotImplemented``\n\nVersion 4.2.x\n^^^^^^^^^^^^^\n\n* Added ``events()`` and ``send_events()`` methods to the client\n* Added ``clear_queue()`` method to the queued client\n* Add ``--timeout`` option for TCP based transports\n\nVersion 4.1.x\n^^^^^^^^^^^^^\n\n* Full Riemann protocol support (TLS transport, event attributes)\n* Fixes for multiple broken features (``--tags``, ``--print``)\n* Raise errors when clients are used incorrectly\n* Client displays errors from Riemann nicely\n* Relaxed version requirements to fit CentOS 6 packages\n\nVersion 3.0.x\n^^^^^^^^^^^^^\n\n* Renamed module from ``riemann`` to ``riemann_client``\n* Command line interface was rewritten, and is now the only part of the library\n that respects the ``RIEMANN_HOST`` and ``RIEMANN_PORT`` environment variables\n* Support for querying the Riemann index was added\n* Internally, transports now define ``send`` instead of ``write``, and\n ``TCPTransport.send`` returns Riemann's response message\n\nLicence\n-------\n\n``riemann-client`` is licensed under the `MIT Licence`_. The protocol buffer\ndefinition is sourced from the `Riemann Java client`_, which is licensed under\nthe `Apache Licence`_.\n\n.. _MIT Licence: http://opensource.org/licenses/MIT\n.. _Riemann Java client: https://github.com/aphyr/riemann-java-client/blob/0c4a1a255be6f33069d7bb24d0cc7efb71bf4bc8/src/main/proto/riemann/proto.proto\n.. _Apache Licence: http://www.apache.org/licenses/LICENSE-2.0\n\nAuthors\n-------\n\n``riemann-client`` was written by `Sam Clements\n<https://github.com/borntyping>`_, while working at `DataSift\n<https://github.com/datasift>`_.\n\n.. image:: https://0.gravatar.com/avatar/8dd5661684a7385fe723b7e7588e91ee?d=https%3A%2F%2Fidenticons.github.com%2Fe83ef7586374403a328e175927b98cac.png&r=x&s=40\n.. image:: https://1.gravatar.com/avatar/a3a6d949b43b6b880ffb3e277a65f49d?d=https%3A%2F%2Fidenticons.github.com%2F065affbc170e2511eeacb3bd0e975ec1.png&r=x&s=40\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A Riemann client and command line tool",
"version": "7.0.0",
"project_urls": {
"Homepage": "https://github.com/borntyping/python-riemann-client"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "44f277c90d13be76a0a8675e6b3e7bf9fecba500657551452be9a641b3ff95ee",
"md5": "0d54e9a69788e60ca99fa512915e4144",
"sha256": "c9a6bdf0ac9fb2a31372e273b9be990cb152d416e258870033a4f1b56e0c78f6"
},
"downloads": -1,
"filename": "riemann_client-7.0.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0d54e9a69788e60ca99fa512915e4144",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 17530,
"upload_time": "2024-03-15T23:04:24",
"upload_time_iso_8601": "2024-03-15T23:04:24.595162Z",
"url": "https://files.pythonhosted.org/packages/44/f2/77c90d13be76a0a8675e6b3e7bf9fecba500657551452be9a641b3ff95ee/riemann_client-7.0.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "94bf2fc38b4ad14dcb343ea5b73f1a1f12c3e5a5cc4382a88ecf2f2cc942f668",
"md5": "aed8d952cb24298c7438d4ba9fe864e4",
"sha256": "923fa7cac112f097c5b630ac6e166c974bd1a921373cb67afa75db728fb10fb5"
},
"downloads": -1,
"filename": "riemann-client-7.0.0.tar.gz",
"has_sig": false,
"md5_digest": "aed8d952cb24298c7438d4ba9fe864e4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 20811,
"upload_time": "2024-03-15T23:04:26",
"upload_time_iso_8601": "2024-03-15T23:04:26.240354Z",
"url": "https://files.pythonhosted.org/packages/94/bf/2fc38b4ad14dcb343ea5b73f1a1f12c3e5a5cc4382a88ecf2f2cc942f668/riemann-client-7.0.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-15 23:04:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "borntyping",
"github_project": "python-riemann-client",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "riemann-client"
}