Publish changes to NATS
Project description
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.Non a commit that is not reachable frommainexercises the release process, creates a GitHub prerelease, uploads package assets, and skips PyPI upload.X.Y.Zon a commit that is reachable frommaincreates 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.
-
Update the version number in
pyproject.toml. -
Update and verify the lock file.
uv lock
uv lock --check
- Commit the version and lock-file changes.
git add pyproject.toml uv.lock
git commit -m "Release X.Y.Z"
- 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.
- Merge the version-change branch to
main, then create and push the stable release tag frommain.
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nautobot_broker_nats-1.2.3.tar.gz.
File metadata
- Download URL: nautobot_broker_nats-1.2.3.tar.gz
- Upload date:
- Size: 7.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ea683c7f87d38b5a6ba11a96ca33f4a6c147f889ab75be7eb3d6a42dbcd1af2
|
|
| MD5 |
92c0ad02e1ee18c4644d002f723f4801
|
|
| BLAKE2b-256 |
1c4e3e3eeadaa083a97082a28cdd73feac7d79d9cbb51a076bddc726b3ff82a1
|
Provenance
The following attestation bundles were made for nautobot_broker_nats-1.2.3.tar.gz:
Publisher:
publish.yml on NVIDIA/nautobot-broker-nats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nautobot_broker_nats-1.2.3.tar.gz -
Subject digest:
6ea683c7f87d38b5a6ba11a96ca33f4a6c147f889ab75be7eb3d6a42dbcd1af2 - Sigstore transparency entry: 2131805497
- Sigstore integration time:
-
Permalink:
NVIDIA/nautobot-broker-nats@e20ddf446532317fda278f26a810e29fedd16773 -
Branch / Tag:
refs/tags/1.2.3 - Owner: https://github.com/NVIDIA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20ddf446532317fda278f26a810e29fedd16773 -
Trigger Event:
push
-
Statement type:
File details
Details for the file nautobot_broker_nats-1.2.3-py3-none-any.whl.
File metadata
- Download URL: nautobot_broker_nats-1.2.3-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c33bca5b0440d6b72f5e95c04cc49c369f31cee2506a6a19c7a72e4be5dbf51c
|
|
| MD5 |
2420f43b5d5dcd210e68067292a59ca0
|
|
| BLAKE2b-256 |
5b040ecd6dbc6a225ea9be3463ae6e36ca83712f55dbfd92144bb839a6e8e1f3
|
Provenance
The following attestation bundles were made for nautobot_broker_nats-1.2.3-py3-none-any.whl:
Publisher:
publish.yml on NVIDIA/nautobot-broker-nats
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nautobot_broker_nats-1.2.3-py3-none-any.whl -
Subject digest:
c33bca5b0440d6b72f5e95c04cc49c369f31cee2506a6a19c7a72e4be5dbf51c - Sigstore transparency entry: 2131805536
- Sigstore integration time:
-
Permalink:
NVIDIA/nautobot-broker-nats@e20ddf446532317fda278f26a810e29fedd16773 -
Branch / Tag:
refs/tags/1.2.3 - Owner: https://github.com/NVIDIA
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@e20ddf446532317fda278f26a810e29fedd16773 -
Trigger Event:
push
-
Statement type: