Skip to main content

NetBox plugin that adds short, URL-safe, globally unique SQID identifiers to every model

Project description

NetBox SQIDs

PyPI Python NetBox CI codecov Documentation Status License: Apache 2.0

Alpha -- this plugin is functional but under active development. The API and SQID encoding may change before 1.0.

Short, URL-safe, globally unique identifiers for every NetBox object.

NetBox SQIDs adds a computed sqid property to every model in your NetBox instance. SQIDs encode the content type and primary key into a compact string that can be shared, bookmarked, and resolved back to the original object — no database changes required.

Quick Example

>>> device = Device.objects.first()
>>> device.sqid
'WK1J'

>>> from netbox_sqids.sqids import resolve_sqid
>>> resolve_sqid('WK1J')
<Device: my-switch>

Visit /s/WK1J/ in your browser to be redirected to the device's detail page.

Features

  • Zero-config — install and every model gets a .sqid property
  • No migrations — pure computed properties, no database changes
  • Globally unique — SQIDs are unique across all models
  • URL-safe — curated 33-character alphabet, no ambiguous characters
  • Redirect views — resolve any SQID via browser or API
  • Short URLs — optional root-level routes like /s/WK1J/

Requirements

Dependency Version
NetBox >= 4.5.0
Python >= 3.12

Installation

pip install netbox-sqids

Add to your NetBox configuration.py:

PLUGINS = ["netbox_sqids"]

Restart NetBox. That's it.

Configuration

All settings are optional:

PLUGINS_CONFIG = {
    "netbox_sqids": {
        "min_length": 4,                      # Minimum SQID length (default: 4)
        "blocklist": None,                    # Word blocklist (None = extended default)
        "monkeypatched_url_prefix": "s",      # Short URL prefix (None to disable)
    },
}

URL Routes

Route Description
/plugins/sqids/<sqid>/ Browser redirect to object
/api/plugins/sqids/<sqid>/ API redirect to object
/s/<sqid>/ Short browser redirect (configurable)
/api/s/<sqid>/ Short API redirect (configurable)

Documentation

Full documentation: jsenecal.github.io/netbox-sqids

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netbox_sqids-0.1.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

netbox_sqids-0.1.2-py3-none-any.whl (11.3 kB view details)

Uploaded Python 3

File details

Details for the file netbox_sqids-0.1.2.tar.gz.

File metadata

  • Download URL: netbox_sqids-0.1.2.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netbox_sqids-0.1.2.tar.gz
Algorithm Hash digest
SHA256 8502c35856a96caadce1330b29bd06ac78cac966565736aa607823e49815c31a
MD5 eb56a11ca52bbc7b7bc3f30667e50fd6
BLAKE2b-256 25116c026635dd359a72570d576522e998140fa41329bb6d583524a36ed764af

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_sqids-0.1.2.tar.gz:

Publisher: publish.yml on jsenecal/netbox-sqids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file netbox_sqids-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: netbox_sqids-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 11.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for netbox_sqids-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5abf0bda3e5a50d3ba984b739dbb9145bc5cd5b2e935ad0e2929f3d1d6b56f36
MD5 1e6382ac0dbe24a5336e245524e07f48
BLAKE2b-256 f85420e64d972fcb3937d17ab939f5c7c4cdb9d568de8b8879c8910ad1dab7f4

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_sqids-0.1.2-py3-none-any.whl:

Publisher: publish.yml on jsenecal/netbox-sqids

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page