Skip to main content

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

Project description

NetBox SQIDs

CI

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.1.tar.gz (11.3 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.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netbox_sqids-0.1.1.tar.gz
  • Upload date:
  • Size: 11.3 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.1.tar.gz
Algorithm Hash digest
SHA256 dfa90f97037a6a48a68e041756351fc206424a7b4eaf9c479b3d29248fd1bd02
MD5 de2a0b68d0189e1d797da55408e2a3ac
BLAKE2b-256 f969d70389b5b520a21e85c2601d8d8c056d5875cc6bd4e067123c4ef4f2ef5b

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_sqids-0.1.1.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.1-py3-none-any.whl.

File metadata

  • Download URL: netbox_sqids-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 cfedcd92b890a7cf45deeceabb0b6043c1fa92a7e7c933f5306a0565915e7621
MD5 98e2fc576ca21ed287c9bde257acce3c
BLAKE2b-256 2cd889b72338c79832e64cde84d0bc4cb3343acab4b26971870cac9abcb15f01

See more details on using hashes here.

Provenance

The following attestation bundles were made for netbox_sqids-0.1.1-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