A NATS helper used by Rancher Opni
Project description
opni-nats-wrapper
This repo contains shared code used to build the pypi package https://pypi.org/project/opni-nats/0.0.0.3/ which is used in several opni services
Testing
- have your nats server running in another terminal. For Mac user, you can do:
brew install nats-server
nats-server
- test the script: (assume your nats server is running on nats://0.0.0.0:4222)
export NATS_SERVER_URL="nats://0.0.0.0:4222"
cd src/opni_nats
python nats_wrapper.py
Contributing
We use pre-commit
for formatting auto-linting and checking import. Please refer to installation to install the pre-commit or run pip install pre-commit
. Then you can activate it for this repo. Once it's activated, it will lint and format the code when you make a git commit. It makes changes in place. If the code is modified during the reformatting, it needs to be staged manually.
# Install
pip install pre-commit
# Install the git commit hook to invoke automatically every time you do "git commit"
pre-commit install
# (Optional)Manually run against all files
pre-commit run --all-files
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
opni-nats-0.0.0.3.tar.gz
(7.7 kB
view hashes)
Built Distribution
Close
Hashes for opni_nats-0.0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ecf35d3ff43c42df1d3fd97ed8be9d4dbe80b1c2572b5a72e74c02c6d775cae1 |
|
MD5 | 77007dad18da58475e6876390a453663 |
|
BLAKE2b-256 | f68382451febc7291fba8e13be94ac90d00d27fdf87fd4b1cd82d1abca5319f9 |