Skip to main content

DMZ-LAN NATS bridge client

Project description

Проект Python-клиента для dmz-nats-bridge

Использование

Для использования клиентского модуля необходимо:

  1. Скопировать файл bridge_client.py в основной проект
  2. В основной проект установить библиотеку
pipenv install nats-python

Пример кода:

from bridge_client import BridgeClient, BridgeResponse, BridgeRequest
import logging

class SampleOneRequest(BridgeRequest):
    def __init__(self):
        super().__init__()
        self.Name: str = ''

one = SampleOneRequest()
one.Name = "Вася"

logger = logging.getLogger()

client = BridgeClient(logger, 'nats://nats-client.k8s.vitebsk.energo.net:4222', 10)
result: dict = client.send_and_recive('sample.one', one)

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

inex-nats-bridge-client-1.0.0.tar.gz (5.9 kB view details)

Uploaded Source

File details

Details for the file inex-nats-bridge-client-1.0.0.tar.gz.

File metadata

  • Download URL: inex-nats-bridge-client-1.0.0.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for inex-nats-bridge-client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 2eaa0229bea8560425845a53825405e21329fb90995c8a36e70bcc4ad3c6039b
MD5 58145ae52cbe6ef9e9affaf8e47f6e53
BLAKE2b-256 d8e116e118780fa3e66c9653ce1c1ed87ef1ea0a12916fa25bcf08ba816d7850

See more details on using hashes here.

Supported by

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