Skip to main content

Crypto Kafka serialize python library

Project description

Latest Version Latest version Documentation Status https://img.shields.io/badge/license-MIT-blue.svg Tests Lint Coverage badge

kser-crypto

Kser module allow you to encrypt and decrypt messages in kafka using libsodium.

Quickstart

First, install kser-crypto using pip:

$ pip install kser-crypto[pykafka]

Examples

Make sure to have the environment variable KSER_SECRETBOX_KEY definded.

Consumer

from kser_crypto.python_kafka.consumer import CryptoConsumer

consumer = CryptoConsumer(config=dict(...), topics=[...])
consumer.run()

Producer

import time
from uuid import uuid4
from kser.schemas import Message
from kser_crypto.python_kafka.producer import CryptoProducer

producer = CryptoProducer(config=dict(...))
producer.send("test", Message(uuid=str(uuid4()), entrypoint="myTest"))
time.sleep(1)

Requirements

  • Python 3.x

  • Libsodium

Documentations

License

Licensed under MIT license (LICENSE or http://opensource.org/licenses/MIT)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kser-crypto-0.1.12.tar.gz (6.2 kB view details)

Uploaded Source

File details

Details for the file kser-crypto-0.1.12.tar.gz.

File metadata

  • Download URL: kser-crypto-0.1.12.tar.gz
  • Upload date:
  • Size: 6.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.16

File hashes

Hashes for kser-crypto-0.1.12.tar.gz
Algorithm Hash digest
SHA256 abc6d6b4e29426818cafe8597b9d79ed4bf2243fbec6433a9af968ca8802cbab
MD5 f771e91033b6e5e7105effd5e07247d0
BLAKE2b-256 7d71d0866b994674f093f04e4a7982b9b477effa9fe09bb21cdaa51e67d88ccd

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page