Skip to main content

Nautobot Changelog Reporting Through Nats

Introduction

This is an event broker for Nautobot that publishes events to NATS.

Configuration

Add this to your nautobot_config.py:

connect = {}

# Optional path to a credentials file.
if "NATS_CRED" in os.environ:
    connect["user_credentials"] = os.environ["NATS_CRED"]

from nautobot.core.events import register_event_broker
from nautobot_nats_broker import NATSEventBroker

register_event_broker(
    NATSEventBroker(
        servers="nats-server-url",
        stream="nautobot",
        **connect,
    )
)

Example Outputs

This is what shows up on NATS when you have this plugin configured and then create a new Namespace resource:

{
  "request": {
    "id": "501a0004-0fdd-404e-b46c-d2a189d868df",
    "user": "test_user"
  },
  "event": "create",
  "model": "ipam.namespace",
  "record": {
    "id": "c310b8cc-bceb-49a2-b323-c109ed828b10",
    "url": "/api/ipam/namespaces/c310b8cc-bceb-49a2-b323-c109ed828b10/",
    "name": "test_namespace",
    "tags": [],
    "created": "2026-03-25T19:18:15.841125Z",
    "display": "test_namespace",
    "location": null,
    "notes_url": "/api/ipam/namespaces/c310b8cc-bceb-49a2-b323-c109ed828b10/notes/",
    "description": "",
    "object_type": "ipam.namespace",
    "last_updated": "2026-03-25T19:18:15.841138Z",
    "natural_slug": "test_namespace_c310",
    "custom_fields": {}
  },
  "@url": "/api/ipam/namespaces/c310b8cc-bceb-49a2-b323-c109ed828b10/",
  "@timestamp": "2026-03-25T19:18:15Z",
  "response": {
    "host": "test_host.example.com"
  }
}

Publishing

Publishing is handled by GitHub Actions through PyPI Trusted Publishing.

The release workflow uses two tag types:

  • X.Y.Z-rc.N on a commit that is not reachable from main exercises the release process, creates a GitHub prerelease, uploads package assets, and skips PyPI upload.
  • X.Y.Z on a commit that is reachable from main creates a GitHub release, uploads package assets, and publishes those assets to PyPI.

The version in pyproject.toml must stay in stable X.Y.Z form. Release candidate tags use the same base version. For example, pyproject.toml can contain 1.2.3 while the RC tag is 1.2.3-rc.1.

  1. Update the version number in pyproject.toml.

  2. Update and verify the lock file.

uv lock
uv lock --check
  1. Commit the version and lock-file changes.
git add pyproject.toml uv.lock
git commit -m "Release X.Y.Z"
  1. Exercise the release flow with a release candidate tag from the branch containing the version-change commit before it is merged to main.
git checkout <release-branch>
git push origin HEAD
git tag X.Y.Z-rc.1
git push origin X.Y.Z-rc.1

Expected result: GitHub Actions validates the tag, builds the package, creates a prerelease, uploads the package assets, and skips PyPI publishing.

  1. Merge the version-change branch to main, then create and push the stable release tag from main.
git checkout main
git pull --ff-only
git tag X.Y.Z
git push origin X.Y.Z

Expected result: GitHub Actions validates the tag, builds the package, creates a release, uploads the package assets, and publishes to PyPI.

Release files for nautobot-broker-nats 1.2.4

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

Source distribution (sdist)

Source distribution for nautobot-broker-nats 1.2.4
File Size Uploaded
nautobot_broker_nats-1.2.4.tar.gz 9.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nautobot-broker-nats 1.2.4
File Interpreter ABI Platform
nautobot_broker_nats-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size: 19.8 kB

Release files / nautobot_broker_nats-1.2.4.tar.gz

Download URL nautobot_broker_nats-1.2.4.tar.gz
Size 9.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2b2f5ca4e68fa0c9b47461cae18a306fb2507a5e3e1de5557dfe2a3beff52851
BLAKE2b-256 checksum
How to use checksums
09f8fff97ecbbd3ad32e0d9d0b96b53414777de930addc299d6ee3edeb6c511f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release files / nautobot_broker_nats-1.2.4-py3-none-any.whl

Download URL nautobot_broker_nats-1.2.4-py3-none-any.whl
Size 9.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b9aeec6e45a5c6db64656a7bb442a13b4e7782bcc3f246d5ade9d3f599b7d206
BLAKE2b-256 checksum
How to use checksums
03f51c3e69f1701726469190a3650786060ae0657441e5f95dc896e76779a4bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.2.4 This release

2 release files

1.2.3

2 release files

1.1.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