Nats-py

Latest version: v2.9.0

Safety actively analyzes 702367 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 4 of 6

0.11.5

Bugfix release that includes 230

0.11.4

Fixed

- Fixed issue of NATS client not reconnecting to NATS Server nodes behind LB 189

0.11.2

Added

- Error callback is now added by default (https://github.com/nats-io/nats.py/pull/170)

Fixed

- Fixed drain timeout error after using request (https://github.com/nats-io/nats.py/issues/171)

0.11.0

Added

- Added ability to access the connection identifier / client id (146)

python
print(nc.client_id)


- Added option to specify tls_hostname (157)

python
await nc.connect(servers=["tls://127.0.0.1:4443"], loop=loop, tls=ssl_ctx, tls_hostname="localhost")


Fixed

- Fixed drain non-callback subscriptions correctly (147)
- Fixed cleaning up subscriptions in the event of a timeout (156)
- Fixed TLS upgrade method, uvloop TLS now supported (164)
- Fixed waiting for all messages to be processed while draining (165)
- Fixed pending byte/msg limits can't be disabled with -1 as it can in other clients ()
- Fixed following connect_timeout in TLS connections (https://github.com/nats-io/nats.py/commit/5d7e01c2c689f2d24baf393e278a6f6e57271779)
- Fixed set outstanding pings to zero when a pong is received https://github.com/nats-io/nats.py/commit/84c6d9a8a02df43ae2ca2efe03806d8f91a2a793
- Fixed support for auto unsubscribe (https://github.com/nats-io/nats.py/commit/bf881ae909f5a948c133e444e4cb135a927cbaa9)

Improved

- Raise `ErrInvalidCallbackType` error when client callback functions are not coroutines (128)
- Many yapf formatting fixes (152)
- Fixed deprecation warnings. Remove unnecessary coverage runs. (149)

Changed

- Testing againts NATS 2.1.8
- Updated examples to async/await syntax
- Client uses f strings (152)

Deprecated

- Deprecated support for Python 3.5. Next release will drop support for Python 3.6.

0.9.2

Added

Add `nkeys_seed` option to be able to connect to server that supports nkeys based auth.

python
await nc.connect(
"tls://127.0.0.1:4222",
nkeys_seed="./path/to/nkeys/user.nk",
)


Fixed

- Fixes handling permissions violation errors and call error cb when they occur in case it is configured.

0.9.0

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:

python
await nc.connect(
"tls://connect.ngs.global:4222",
user_credentials="./tests/nkeys/user.creds"
)


python
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

python
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 (https://github.com/nats-io/nats.py/pull/103/commits/c5b1f4ef908bcf0a177fed9dd54f0513f077705e)

Fixed

- Fixed issue when using `verbose` mode (https://github.com/nats-io/nats.py/issues/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

Page 4 of 6

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.