Skip to main content

No project description provided

Project description

ReNATS

Elegant, modern and asynchronous NATS Client API library written in pure Python

from renats.client import NATSClient


client = await NATSClient().connect("127.0.0.1", 4222)

# Publish message to subject 'my.subject' with payload 'My payload =)'
await client.publish("my.subject", b"My payload =)")

# Publish message to subject 'my.subject' with payload 'My payload =)',
# reply subject 'my.reply.subject' and header 'MyHeader' with value 'MyValue'
await client.publish(
    subject="my.subject",
    data=b"My payload =)",
    reply="my.reply.subject",
    headers={
        "MyHeader": "MyValue"
    }
)

# Closing client
await client.close()

Installation

pip install renats

TODO

  • Subscriptions
  • Request-Reply
  • JetStream
  • ObjectStorage
  • Request-Reply API Framework for microservices
  • And more, maybe...

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

renats-0.2.1a0.tar.gz (15.9 kB view hashes)

Uploaded Source

Built Distribution

renats-0.2.1a0-py3-none-any.whl (10.4 kB view hashes)

Uploaded Python 3

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