github nats-io/nats.py v0.9.0
Release v0.9.0

latest releases: v2.8.0, v2.7.2, v2.7.0...
5 years ago

Added

  • Added support for NKEYS/JWT for NATS v2 new auth features. The nkeys dependency is optional and can be installed via pip as an extra package: pip install asyncio-nats-client[nkeys].

Usage:

await nc.connect(
    "tls://connect.ngs.global:4222",
    user_credentials="./tests/nkeys/user.creds"
)
await nc.connect(
    "tls://connect.ngs.global:4222",
    user_credentials=(
      "./tests/nkeys/user.jwt", "./tests/nkeys/user.nk"
    )
)
  • Added support for functools partials to subscriptions
async def subscription_handler(arg1, msg):
    print(arg1)
    msgs.append(msg)

partial_sub_handler = functools.partial(subscription_handler, "example")
await nc.subscribe("foo", cb=partial_sub_handler)
  • Added Pipfile to the repo to adopt pipenv based flow

  • Added support to connect securely with TLS to implicit ips (c5b1f4e)

Fixed

  • Fixed issue when using verbose mode (#93)

Changed

  • Changed Repo name is now nats.py like other NATS clients.
  • Adopted yapf for formatting
  • Changed testing pytest is now used to run the tests

Deprecated

  • Removed tests/test.py since no longer used

Don't miss a new nats.py release

NewReleases is sending notifications on new releases.