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 adoptpipenv
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