Skip to main content

NetBox Branching

This NetBox plugin introduces branching functionality. A branch is a discrete, static snapshot of the NetBox database which can be modified independently and later merged back into the main database. This enables users to make "offline" changes to objects within NetBox and avoid interfering with its integrity as the network source of truth. It also provides the opportunity to review changes in bulk prior to their application.

See the compatibility matrix for supported NetBox versions.

Installation

Brief installation instructions are provided below. For a complete installation guide, please refer to the included documentation.

  1. Grant PostgreSQL permission for the NetBox database user to create schemas:
GRANT CREATE ON DATABASE $database TO $user;
  1. Activate the NetBox virtual environment:
$ source /opt/netbox/venv/bin/activate
  1. Install the plugin from PyPI:
$ pip install netboxlabs-netbox-branching
  1. Add netbox_branching to PLUGINS in configuration.py.
PLUGINS = [
    # ...
    'netbox_branching',
]
  1. Configure the database and router in configuration.py:
from netbox_branching.utilities import DynamicSchemaDict

DATABASES = DynamicSchemaDict({
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'netbox',               # Database name
        'USER': 'netbox',               # PostgreSQL username
        'PASSWORD': 'password',         # PostgreSQL password
        'HOST': 'localhost',            # Database server
        'PORT': '',                     # Database port (leave blank for default)
        'CONN_MAX_AGE': 300,            # Max database connection age
    }
})

DATABASE_ROUTERS = [
    'netbox_branching.database.BranchAwareRouter',
]
  1. Run NetBox migrations:
$ ./manage.py migrate

Running Tests

Plugin tests must be run from the NetBox application directory. Pass the PYTHONPATH environment variable to specify the testing/ directory which holds the testing configuration.

cd $NETBOX_ROOT/netbox
PYTHONPATH=$PLUGIN_ROOT/testing \
NETBOX_CONFIGURATION=configuration \
python manage.py test netbox_branching.tests

Metadata

Release files for netboxlabs-netbox-branching 1.2.1

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

Source distribution (sdist)

Source distribution for netboxlabs-netbox-branching 1.2.1
File Size Uploaded
netboxlabs_netbox_branching-1.2.1.tar.gz 104.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netboxlabs-netbox-branching 1.2.1
File Interpreter ABI Platform
netboxlabs_netbox_branching-1.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 236.5 kB

Release files / netboxlabs_netbox_branching-1.2.1.tar.gz

Download URL netboxlabs_netbox_branching-1.2.1.tar.gz
Size 104.8 kB
Tags Source
SHA-256 checksum
How to use checksums
931b247d24fc7c32d89d428944cefa2b74781a4aed12faa66dc618af40425e32
BLAKE2b-256 checksum
How to use checksums
3bed9e10c72309f3bb6836386a696ecc1d7e70b379654d80a9aed7c52d187742
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 Sep 9, 2026.

Transparency log

Release files / netboxlabs_netbox_branching-1.2.1-py3-none-any.whl

Download URL netboxlabs_netbox_branching-1.2.1-py3-none-any.whl
Size 131.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56ce02b1ab0aecb39f740f75378ecb46c58dc9463834998ca15a6b7b16d153a2
BLAKE2b-256 checksum
How to use checksums
b5c0961d8ea212c25725a747b9402551d2c59cc20c5ca4c1c22dd260a3e4bb03
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 Sep 9, 2026.

Transparency log
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