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