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.2.0.tar.gz (14.4 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.2.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: netbox_sqids-0.2.0.tar.gz
  • Upload date:
  • Size: 14.4 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.2.0.tar.gz
Algorithm Hash digest
SHA256 6b73ef93f7b4431d7051f5b7b9060083aedb504414b0832ed9cd25ff21643251
MD5 af5d576a8fa2ef862bd90f0aeb231eb4
BLAKE2b-256 8e66f80a7d253c0a05c2beeb5577043809c723f8653c64220dd4e70705f25f18

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: netbox_sqids-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 11.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.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0adc14cacb7f71f3120822b29f0d1e18a672fe7526c52291316dc5e6dd2dcd5b
MD5 9b3b681e399f6a455479c2f5f96b6540
BLAKE2b-256 f8ba7c3c79c9db66e015de1bf83a3893ad632f742cd049552f59762b6d207374

See more details on using hashes here.

Provenance

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