# nats-io/nats.py

Python3 client for NATS

Repository: https://github.com/nats-io/nats.py
Canonical: https://ross.abutalabs.com/products/natspy
Homepage: https://nats-io.github.io/nats.py/
Language: Python
License: Apache-2.0
License Family: permissive
Topics: asyncio, nats, python3, cloud-native, aio-nats, aio
Last push: 2026-08-21T22:18:14+00:00

## Health v2 (maintenance only)
Score: 95/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 98, release rhythm 87, longevity 100
- inputs: {"age_days": 3901, "days_push": 12, "days_rel": 89, "gap_med": 24.0, "n_releases_24m": 13}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1243, forks 262 (observed 2026-08-28T04:04:06.609866+00:00)

## What it is
nats.py is the official asyncio-based Python client for the NATS messaging system, supporting pub/sub, request/reply, and JetStream. It also includes a companion nats-server package for managing NATS server instances during development and testing.

## Use cases
- publish and subscribe to messages over NATS from Python
- build async microservices communicating via NATS
- use JetStream persistent messaging from Python
- implement request/reply messaging with asyncio
- spin up NATS servers programmatically for tests
- connect Python apps to cloud-native NATS clusters

## When to choose
- you need an async Python client for NATS or JetStream
- you're building event-driven or microservice architectures in Python
- you want official, well-maintained NATS support with TLS and JWT auth

## When to avoid
- you need a synchronous/blocking NATS client
- you use Kafka, RabbitMQ, or another broker instead of NATS
- you're not working in Python

## Facets
- artifact type: library
- maturity: active
- function: message-queue, http-client, sdk
- domain: microservices, cloud-computing, developer-tools
- platform: python, cross-platform
- tags: nats, asyncio, pub-sub, jetstream, cloud-native, messaging-client, messaging

## Member repositories
- nats-io/nats.py (main) score 95

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:04:06.609866+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:08:20.531961+00:00, confidence not recorded.
  - readme: https://github.com/nats-io/nats.py (fetched 2026-08-28T04:04:06.609866+00:00, sha b0f3c60b063f)
  - homepage: https://nats-io.github.io/nats.py/ (fetched 2026-08-29T12:20:13.933306+00:00, sha 66cdc4554d75)
  - registry_pypi: https://pypi.org/pypi/nats.py/json (fetched 2026-08-29T12:20:13.935951+00:00, sha 01a63b8e36c9)
- Data as of 2026-08-30T08:39:29.467469+00:00.
