kser


Namekser JSON
Version 0.8.25 PyPI version JSON
download
home_pagehttps://github.com/cdumay/kser
SummaryKafka serialize python library
upload_time2024-08-02 08:11:00
maintainerNone
docs_urlNone
authorCedric DUMAY
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements cdumay-error cdumay-result
Travis-CI
coveralls test coverage
            .. image:: https://img.shields.io/pypi/v/kser.svg
   :target: https://pypi.python.org/pypi/kser/
   :alt: Latest Version

.. image:: https://travis-ci.org/cdumay/kser.svg?branch=master
   :target: https://travis-ci.org/cdumay/kser
   :alt: Latest version

.. image:: https://readthedocs.org/projects/kser/badge/?version=latest
   :target: http://kser.readthedocs.io/en/latest/?badge=latest
   :alt: Documentation Status

.. image:: https://img.shields.io/badge/license-BSD3-blue.svg
    :target: https://github.com/cdumay/kser/blob/master/LICENSE

.. image:: https://github.com/cdumay/kser/blob/reports/junit/tests-badge.svg?raw=true
   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/junit/report.html
   :alt: Tests

.. image:: https://github.com/cdumay/kser/blob/reports/flake8/flake8-badge.svg?raw=true
   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/flake8/index.html
   :alt: Lint

.. image:: https://github.com/cdumay/kser/blob/reports/coverage/coverage-badge.svg?raw=true
   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/coverage/html/index.html
   :alt: Coverage badge

==============================
Kafka serialize python library
==============================

Kser is a bundle of python library whose purpose is to serialize tasks to be
executed on Kafka consumers. It supports farious extensions:

Transport
=========

librdkafka
----------

You can choose to use the C bindings using `confluent-kafka <https://github.com/confluentinc/confluent-kafka-python>`_:

    $ pip install kser[confluent]

.. note::

    You need to install manually librdkafka, see `confluent-kafka-python documentation <http://docs.confluent.io/current/clients/confluent-kafka-python>`_

kafka-python
------------

You can choose the pure python library `kafka-python <https://github.com/dpkp/kafka-python>`_:

    $ pip install kser[pykafka]

http
----

There is also a light version using HTTP ideal to produce messages (not recommended for consumption)

    $ pip install kser[http]

dummy
-----

There is a dummy version for tests, no additional import required, just use / patch with the dummy module.

Other
=====

encrypt data
------------

It is possible to encrypt messages in the Kafka queue using `libsodium <https://github.com/jedisct1/libsodium>`_.

    $ pip install kser[crypto]

.. note::

    You need to install manually libsodium, see `libsodium documentation <https://download.libsodium.org/doc/>`_

prometheus exporter
-------------------

You can export metrics using the `prometheus <https://prometheus.io/>`_ format:

    $ pip install kser[prometheus]

A few set of environment variables allow to manage the exporter:

+----------------------+---------------+
| Environment variable | Default value |
+======================+===============+
| KSER_METRICS_ENABLED | no            |
+----------------------+---------------+
| KSER_METRICS_ADDRESS | 0.0.0.0       |
+----------------------+---------------+
| KSER_METRICS_PORT    | 8888          |
+----------------------+---------------+

The exporter has only 2 metrics defined by default, it's just a sample. A good
way to implement your own is to override the triggers methods (prefixed with '_') like the following example:

.. code-block:: python

    from kser import KSER_METRICS_ENABLED
    from prometheus_client import Counter
    from kser.entry import Entrypoint

    MY_METRIC = Counter('kser_my_metric', 'a usefull metric')


    class MyEntrypoint(Entrypoint):
        def _run(self):
            if KSER_METRICS_ENABLED == "yes":
                MY_METRIC.inc()

            return self.run()

See also:

    `prometheus_client documentation <https://github.com/prometheus/client_python>`_
        Documentation of the python Prometheus client

opentracing support
-------------------

You can use `opentracing <http://opentracing.io/>`_ with `Jaeger <https://www.jaegertracing.io/docs/>`_ to follow operation and task:

    $ pip install kser[opentracing]

Configuration can be set using environment variable:

+----------------------+---------------+
| Environment variable | Default value |
+======================+===============+
| JAEGER_HOST          | localhost     |
+----------------------+---------------+

See also:

    `Opentracing support with Jaeger <http://kser.readthedocs.io/en/latest/opentracing.html>`_
        Kser documentation

Add-ons
=======

- `Flask extension <https://github.com/cdumay/flask-kser>`_: Flask integration.

Requirements
============

- Python 3.x

Documentations
==============

- Project: http://kser.readthedocs.io/
- Libsodium: https://download.libsodium.org/doc/
- confluent-kafka-python: http://docs.confluent.io/current/clients/confluent-kafka-python
- kafka-python: http://kafka-python.readthedocs.io/en/master/

Other links
===========

- PyPI: https://pypi.python.org/pypi/kser
- Project issues: https://github.com/cdumay/kser/issues

License
=======

Licensed under `BSD 3-Clause License <./LICENSE>`_ or https://opensource.org/licenses/BSD-3-Clause.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/cdumay/kser",
    "name": "kser",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Cedric DUMAY",
    "author_email": "cedric.dumay@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/79/8d/8864b5a1f20d65ea60d5734a378bfe10c4bfda89084e30b96d40d5b25a19/kser-0.8.25.tar.gz",
    "platform": null,
    "description": ".. image:: https://img.shields.io/pypi/v/kser.svg\n   :target: https://pypi.python.org/pypi/kser/\n   :alt: Latest Version\n\n.. image:: https://travis-ci.org/cdumay/kser.svg?branch=master\n   :target: https://travis-ci.org/cdumay/kser\n   :alt: Latest version\n\n.. image:: https://readthedocs.org/projects/kser/badge/?version=latest\n   :target: http://kser.readthedocs.io/en/latest/?badge=latest\n   :alt: Documentation Status\n\n.. image:: https://img.shields.io/badge/license-BSD3-blue.svg\n    :target: https://github.com/cdumay/kser/blob/master/LICENSE\n\n.. image:: https://github.com/cdumay/kser/blob/reports/junit/tests-badge.svg?raw=true\n   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/junit/report.html\n   :alt: Tests\n\n.. image:: https://github.com/cdumay/kser/blob/reports/flake8/flake8-badge.svg?raw=true\n   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/flake8/index.html\n   :alt: Lint\n\n.. image:: https://github.com/cdumay/kser/blob/reports/coverage/coverage-badge.svg?raw=true\n   :target: https://htmlpreview.github.io/?https://github.com/cdumay/kser/blob/reports/coverage/html/index.html\n   :alt: Coverage badge\n\n==============================\nKafka serialize python library\n==============================\n\nKser is a bundle of python library whose purpose is to serialize tasks to be\nexecuted on Kafka consumers. It supports farious extensions:\n\nTransport\n=========\n\nlibrdkafka\n----------\n\nYou can choose to use the C bindings using `confluent-kafka <https://github.com/confluentinc/confluent-kafka-python>`_:\n\n    $ pip install kser[confluent]\n\n.. note::\n\n    You need to install manually librdkafka, see `confluent-kafka-python documentation <http://docs.confluent.io/current/clients/confluent-kafka-python>`_\n\nkafka-python\n------------\n\nYou can choose the pure python library `kafka-python <https://github.com/dpkp/kafka-python>`_:\n\n    $ pip install kser[pykafka]\n\nhttp\n----\n\nThere is also a light version using HTTP ideal to produce messages (not recommended for consumption)\n\n    $ pip install kser[http]\n\ndummy\n-----\n\nThere is a dummy version for tests, no additional import required, just use / patch with the dummy module.\n\nOther\n=====\n\nencrypt data\n------------\n\nIt is possible to encrypt messages in the Kafka queue using `libsodium <https://github.com/jedisct1/libsodium>`_.\n\n    $ pip install kser[crypto]\n\n.. note::\n\n    You need to install manually libsodium, see `libsodium documentation <https://download.libsodium.org/doc/>`_\n\nprometheus exporter\n-------------------\n\nYou can export metrics using the `prometheus <https://prometheus.io/>`_ format:\n\n    $ pip install kser[prometheus]\n\nA few set of environment variables allow to manage the exporter:\n\n+----------------------+---------------+\n| Environment variable | Default value |\n+======================+===============+\n| KSER_METRICS_ENABLED | no            |\n+----------------------+---------------+\n| KSER_METRICS_ADDRESS | 0.0.0.0       |\n+----------------------+---------------+\n| KSER_METRICS_PORT    | 8888          |\n+----------------------+---------------+\n\nThe exporter has only 2 metrics defined by default, it's just a sample. A good\nway to implement your own is to override the triggers methods (prefixed with '_') like the following example:\n\n.. code-block:: python\n\n    from kser import KSER_METRICS_ENABLED\n    from prometheus_client import Counter\n    from kser.entry import Entrypoint\n\n    MY_METRIC = Counter('kser_my_metric', 'a usefull metric')\n\n\n    class MyEntrypoint(Entrypoint):\n        def _run(self):\n            if KSER_METRICS_ENABLED == \"yes\":\n                MY_METRIC.inc()\n\n            return self.run()\n\nSee also:\n\n    `prometheus_client documentation <https://github.com/prometheus/client_python>`_\n        Documentation of the python Prometheus client\n\nopentracing support\n-------------------\n\nYou can use `opentracing <http://opentracing.io/>`_ with `Jaeger <https://www.jaegertracing.io/docs/>`_ to follow operation and task:\n\n    $ pip install kser[opentracing]\n\nConfiguration can be set using environment variable:\n\n+----------------------+---------------+\n| Environment variable | Default value |\n+======================+===============+\n| JAEGER_HOST          | localhost     |\n+----------------------+---------------+\n\nSee also:\n\n    `Opentracing support with Jaeger <http://kser.readthedocs.io/en/latest/opentracing.html>`_\n        Kser documentation\n\nAdd-ons\n=======\n\n- `Flask extension <https://github.com/cdumay/flask-kser>`_: Flask integration.\n\nRequirements\n============\n\n- Python 3.x\n\nDocumentations\n==============\n\n- Project: http://kser.readthedocs.io/\n- Libsodium: https://download.libsodium.org/doc/\n- confluent-kafka-python: http://docs.confluent.io/current/clients/confluent-kafka-python\n- kafka-python: http://kafka-python.readthedocs.io/en/master/\n\nOther links\n===========\n\n- PyPI: https://pypi.python.org/pypi/kser\n- Project issues: https://github.com/cdumay/kser/issues\n\nLicense\n=======\n\nLicensed under `BSD 3-Clause License <./LICENSE>`_ or https://opensource.org/licenses/BSD-3-Clause.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Kafka serialize python library",
    "version": "0.8.25",
    "project_urls": {
        "Homepage": "https://github.com/cdumay/kser"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "798d8864b5a1f20d65ea60d5734a378bfe10c4bfda89084e30b96d40d5b25a19",
                "md5": "dbf95eff4305522cd1793cfbbb78ff04",
                "sha256": "09ba51bb8052d4f1460dff2516c8e7106425c36b22beeabb52e3e21586379d2f"
            },
            "downloads": -1,
            "filename": "kser-0.8.25.tar.gz",
            "has_sig": false,
            "md5_digest": "dbf95eff4305522cd1793cfbbb78ff04",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 15594,
            "upload_time": "2024-08-02T08:11:00",
            "upload_time_iso_8601": "2024-08-02T08:11:00.565264Z",
            "url": "https://files.pythonhosted.org/packages/79/8d/8864b5a1f20d65ea60d5734a378bfe10c4bfda89084e30b96d40d5b25a19/kser-0.8.25.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-02 08:11:00",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "cdumay",
    "github_project": "kser",
    "travis_ci": true,
    "coveralls": true,
    "github_actions": true,
    "requirements": [
        {
            "name": "cdumay-error",
            "specs": [
                [
                    ">=",
                    "0.1.14"
                ]
            ]
        },
        {
            "name": "cdumay-result",
            "specs": [
                [
                    ">=",
                    "0.1.12"
                ]
            ]
        }
    ],
    "lcname": "kser"
}
        
Elapsed time: 0.27786s