Skip to main content

NATS Client

A Python client for the NATS messaging system.

Features

  • Support for publish/subscribe
  • Support for request/reply
  • Support for queue groups
  • Support for multi-value message headers

Installation

pip install nats-core

Usage

import asyncio
from nats.client import connect

async def main():
    client = await connect("nats://localhost:4222")

    # Subscribe
    async with await client.subscribe("foo") as subscription:
        # Publish
        await client.publish("foo", "Hello World!")

        # Receive message
        message = await subscription.next()
        print(f"Received: {message.data}")

    await client.close()

if __name__ == "__main__":
    asyncio.run(main())

Release files for nats-core 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nats-core 0.2.0
File Size Uploaded
nats_core-0.2.0.tar.gz 22.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nats-core 0.2.0
File Interpreter ABI Platform
nats_core-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 48.9 kB

Release files / nats_core-0.2.0.tar.gz

Download URL nats_core-0.2.0.tar.gz
Size 22.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f0299490b263d67cd298c9eeafb0634b067bd064eb56568ecc75698a5efc49fe
BLAKE2b-256 checksum
How to use checksums
06ecda29ae3ff515c561f8cb8c4c6a6a6ab936261a9d590a8a6249885e261be2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / nats_core-0.2.0-py3-none-any.whl

Download URL nats_core-0.2.0-py3-none-any.whl
Size 26.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
86ffc0531509945cc114c03c25b6d9b1a0a4ff1f5a6a30074e3a43d3fbefa687
BLAKE2b-256 checksum
How to use checksums
7ace1957df7551c21d6948105c772f86a9bbd7f8371a1e47f7844bc7ce86a2b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.10.0 {"installer":{"name":"uv","version":"0.10.0","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

0.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page