- Notifications
You must be signed in to change notification settings - Fork23
Python client for NATS messaging system
License
Gr1N/nats-python
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Python client for NATS messaging system.
This project is a replacement for abandonedpynats.nats-python supports only Python 3.6+ and fully covered with typings.
Go to theasyncio-nats project, if you're looking forasyncio implementation.
$ pip install nats-python
frompynatsimportNATSClientwithNATSClient()asclient:# Connectclient.connect()# Subscribedefcallback(msg):print(f"Received a message with subject{msg.subject}:{msg}")client.subscribe(subject="test-subject",callback=callback)# Publish a messageclient.publish(subject="test-subject",payload=b"test-payload")# wait for 1 messageclient.wait(count=1)
To work on thenats-python codebase, you'll want to clone the project locally and install the required dependencies viapoetry:
$ git clone git@github.com:Gr1N/nats-python.git$ make install
To run tests and linters use command below:
$ make lint&& maketest
If you want to run only tests or linters you can explicitly specify which test environment you want to run, e.g.:
$ make lint-black
nats-python is licensed under the MIT license. See the license file for details.
About
Python client for NATS messaging system
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.