NATS Toolkit
Project description
NATS Tools
Tools to work with NATS server from Python.
NATSD
Use this class to easily start/stop NATS servers:
from nats_tools import NATSD
# Create a new nats-server daemon
natsd = NATSD(debug=True)
# Start the server
natsd.start()
# Stop the server
natsd.stop()
- Can be used as a context manager:
with NATSD(debug=True) as natsd:
print(natsd.proc.pid)
- Can be used to interact with monitoring API:
with NATSD(debug=True) as natsd:
# Show /varz endpoint
print(natsd.monitor.varz())
# Show /jsz endpoint
print(natsd.monitor.jsz())
# Show /connz endpoint
print(natsd.monitor.connz)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nats-tools-0.1.0.tar.gz
(20.3 kB
view hashes)
Built Distribution
nats_tools-0.1.0-py3-none-any.whl
(19.4 kB
view hashes)
Close
Hashes for nats_tools-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 787d55077afbd4e141c46d7d2fa845b69bdbd068ddc044feec431b0343dcd1de |
|
MD5 | b871b115451f8fe494a6c9fbd01e9f7a |
|
BLAKE2b-256 | a89085a1b9baecf02f34c5e41a40fc8d585be46b0d48cf1210b9cb8c2001619c |