{"id":13791936,"url":"https://github.com/netbox-community/netbox-qrcode","last_synced_at":"2025-04-04T18:05:24.149Z","repository":{"id":40247664,"uuid":"279843568","full_name":"netbox-community/netbox-qrcode","owner":"netbox-community","description":"NetBox Plugin for generate QR Codes","archived":false,"fork":false,"pushed_at":"2024-05-17T15:14:10.000Z","size":2269,"stargazers_count":187,"open_issues_count":15,"forks_count":29,"subscribers_count":16,"default_branch":"master","last_synced_at":"2024-05-23T05:17:29.023Z","etag":null,"topics":["netbox","netbox-plugin"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/netbox-community.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":"CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-15T10:56:58.000Z","updated_at":"2024-05-23T05:17:29.024Z","dependencies_parsed_at":"2024-01-18T08:38:26.378Z","dependency_job_id":"a5fdae2c-70f0-481b-8f5d-543cc119074e","html_url":"https://github.com/netbox-community/netbox-qrcode","commit_stats":{"total_commits":46,"total_committers":9,"mean_commits":5.111111111111111,"dds":0.6956521739130435,"last_synced_commit":"0a58376da1bc65cb0e10db33b9da563ebab10dfb"},"previous_names":["k01ek/netbox-qrcode"],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbox-community%2Fnetbox-qrcode","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbox-community%2Fnetbox-qrcode/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbox-community%2Fnetbox-qrcode/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/netbox-community%2Fnetbox-qrcode/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/netbox-community","download_url":"https://codeload.github.com/netbox-community/netbox-qrcode/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247226213,"owners_count":20904465,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["netbox","netbox-plugin"],"created_at":"2024-08-03T22:01:06.028Z","updated_at":"2025-04-04T18:05:24.131Z","avatar_url":"https://github.com/netbox-community.png","language":"Python","funding_links":[],"categories":["Plugins"],"sub_categories":[],"readme":"# Netbox QR Code Plugin\n\n[Netbox](https://github.com/netbox-community/netbox) plugin for generate QR codes for objects: Rack, Device, Cable.\n\nThis plugin depends on [qrcode](https://github.com/lincolnloop/python-qrcode) and [Pillow](https://github.com/python-pillow/Pillow) python library\n\n[![Downloads](https://static.pepy.tech/badge/netbox-qrcode)](https://pepy.tech/project/netbox-qrcode)\n[![Downloads](https://static.pepy.tech/badge/netbox-qrcode/month)](https://pepy.tech/project/netbox-qrcode)\n[![Downloads](https://static.pepy.tech/badge/netbox-qrcode/week)](https://pepy.tech/project/netbox-qrcode)\n\n## Compatibility\n\n| Plugin Version | NetBox Version | Tested on |\n| ------------- |:-------------| :-----------:|\n| 0.0.11        | 3.7.x        | 3.7.x        |\n| 0.0.14        | 4.0.x        | v4.0.11      |\n| 0.0.15        | 4.1.x        | v4.1.6       |\n| 0.0.17        | 4.2.x        | v4.2.4       |\n\n\n## Installation\n\nIf Netbox was installed according to the standard installation instructions. It may be necessary to activate the virtual environment.\n\n```\nsource /opt/netbox/venv/bin/activate\n```\n\nThe plugin is available as a Python package in pypi and can be installed with pip\n\n```\npip install netbox-qrcode\n```\nEnable the plugin in /opt/netbox/netbox/netbox/configuration.py:\n```\nPLUGINS = ['netbox_qrcode']\n```\nRestart NetBox and add `netbox-qrcode` to your local_requirements.txt\n\n## Configuration\n\nThe following options are available:\n\n* `with_text`: Boolean (default True). Text label will be added to QR code image if enabled.\n* `text_template`: [Jinja2](https://jinja.palletsprojects.com/) template with {{ obj }} as context for device, rack, etc., using it ignores `text_fields` and `custom_text`.\n\n  Example to output name and site in two lines with caption (See also screenshots below):\n  ```\n  'text_template': 'Name: {{ obj.name }}\\nSite: {{ obj.site }}',\n  ```\n* `text_fields`: List of String (default ['name']). Text fields of an object that will be added as text label to QR image. It's possible to use custom field values.\n* `font`: String (default TahomaBold) Font name for text label ( Some font include in package, see fonts dir).\n* `text_location`: Where to render the text, relative to the QR code.  Valid values are `\"right\"` (default), `\"left\"`\", `\"up\"`, and `\"down\"`.\n* `custom_text`: String or None (default None) additional text label to QR code image (will be added after text_fields).\n* `qr_version`: Integer (default 1) parameter is an integer from 1 to 40 that controls the size of\nthe QR Code (the smallest, version 1, is a 21x21 matrix).\n* `qr_error_correction`: Integer (default 0),  controls the error correction used for the\nQR Code. The following values are available:\n\n   1 - About 7% or less errors can be corrected.\n   0 - About 15% or less errors can be corrected.\n   2 - About 30% or less errors can be corrected.\n   3 - About 25% or less errors can be corrected.\n\n* `qr_box_size`: Integer (default 6),  controls how many pixels each \"box\" of the QR code\nis.\n* `qr_border`: Integer (default 4),  controls how many boxes thick the border should be\n(the default is 4, which is the minimum according to the specs).\n\n### Per object options\n\nPer object options override default options. Per object options dictionary can contains any of default options inside.\n\n* `device`: Dict or None (default {'text_fields': ['name', 'serial']}), set None to disble QR code\n* `rack`: Dict or None (default {'text_fields': ['name']}) , set None to disble QR code\n* `cable`: Dict or None ( defaul {'text_fields': ['_termination_a_device', 'termination_a', '_termination_b_device', 'termination_b',]}), set None to disble QR code\n\nConfiguration example:\n```\nPLUGINS_CONFIG = {\n    'netbox_qrcode': {\n        'with_text': True,\n        'text_fields': ['name', 'serial'],\n        'font': 'ArialMT',\n        'font_size': 12, # If the value is 0 or the line does not exist, then the text is automatically adjusted\n        'custom_text': 'Property of SomeCompany\\ntel.8.800333554-CALL',\n        'text_location': 'up',\n        'qr_version': 1,\n        'qr_error_correction': 0,\n        'qr_box_size': 4,\n        'qr_border': 4,\n        # per object options\n        'cable': None,  # disable QR code for Cable object\n        'rack': {\n            'text_fields': [\n                'site',\n                'name',\n                'facility_id',\n                'tenant',\n                'cf.cf_name'\n            ]\n        },\n        'device': {\n            'qr_box_size': 6,\n            'custom_text': None,\n        }\n    }\n}\n```\n\n## Contributing\nDeveloping tools for this project based on [ntc-netbox-plugin-onboarding](https://github.com/networktocode/ntc-netbox-plugin-onboarding) repo.\n\nIssues and pull requests are welcomed.\n\n## Screenshots\n\nDevice QR code with text label\n![Device QR Code](docs/img/qrcode.png)\n\nRack QR code\n![Rack QR Code](docs/img/qrcode_rack.png)\n\nCable QR code\n![Cable QR Code](docs/img/qrcode_cable.png)\n\nDevice QR code via Jinja2 \"text_template\" Parameter (Multiline and labeled)\n![Cable QR Code](docs/img/qrcode_text_template.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbox-community%2Fnetbox-qrcode","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnetbox-community%2Fnetbox-qrcode","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnetbox-community%2Fnetbox-qrcode/lists"}