Skip to main content

'Thread based NATS client for Python 3',

Project description


Thread based python client for NATS messaging system.

This project is a replacement for abandoned pynats and nats-python. pynats2 supports only Python 3.6+ and fully covered with typings.

Go to the asyncio-nats project, if you're looking for asyncio implementation.


$ pip install pynats2


from pynats2 import NATSClient

with NATSClient() as client:
    client.publish("test-subject", payload=b"test-payload")


To work on the pynats2 codebase, you'll want to clone the project locally and install the required dependencies via pip.

$ git clone
$ pip install -r requirements.txt
$ python install

To run tests and linters use command below:

$ black --check --diff .
$ flake8 pynats2 tests
$ mypy --ignore-missing-imports --follow-imports=silent pynats2 tests


pynats2 is licensed under the MIT license. See the license file for details.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pynats2, version 0.9.0
Filename, size File type Python version Upload date Hashes
Filename, size pynats2-0.9.0-py3.6.egg (19.6 kB) File type Egg Python version 3.6 Upload date Hashes View
Filename, size pynats2-0.9.0-py3-none-any.whl (9.7 kB) File type Wheel Python version py3 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page