Skip to main content

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/ which is used in several opni services

Testing

  1. have your nats server running in another terminal. For Mac user, you can do:
brew install nats-server
nats-server
  1. 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"
export NATS_USERNAME=
export NATS_PASSWORD=
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.1.0.tar.gz (9.7 kB view details)

Uploaded Source

File details

Details for the file opni-nats-0.1.0.tar.gz.

File metadata

  • Download URL: opni-nats-0.1.0.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for opni-nats-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9eb9301794746f7700e4cc74631a4737c6898e39ede26f12be78814f12081566
MD5 32764161a92bd6e266d8aa5eb00d0127
BLAKE2b-256 01a630868bb5e670ffd7ef6225030f2f27630278c6e00432d661198e8fb7312f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page