nats-io/nats.py ? reverse-engineered prompt

Reverse engineered prompt

Build me a Python library for talking to NATS with async and await.

I want it to let me connect to a NATS server, publish and subscribe to messages, do request and reply, and handle common errors cleanly. It should also support JetStream so I can create streams, publish messages that are stored, pull messages back, ack them, and use durable or ordered consumers. Please include TLS connection support and a simple way to use NKEYS or JWT credentials if they’re available.

If it makes sense, add a small helper for starting and managing local NATS servers for development and tests too. Keep the API simple and easy to use from normal Python code, and make sure there are a few working examples or sample scripts showing the main flows. Use current docs online if you need to confirm any NATS details.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab