{"id":21345210,"url":"https://github.com/k01ek/netbox-plugin-skeleton","last_synced_at":"2025-07-12T15:32:36.049Z","repository":{"id":41459620,"uuid":"359814071","full_name":"k01ek/netbox-plugin-skeleton","owner":"k01ek","description":"Skeleton for starting NetBox plugins","archived":false,"fork":false,"pushed_at":"2022-07-02T06:47:49.000Z","size":34,"stargazers_count":30,"open_issues_count":2,"forks_count":6,"subscribers_count":3,"default_branch":"main","last_synced_at":"2023-03-04T15:57:35.526Z","etag":null,"topics":["netbox","netbox-plugin","python","skeleton"],"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/k01ek.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":null,"security":null,"support":null}},"created_at":"2021-04-20T12:49:57.000Z","updated_at":"2023-01-09T10:11:48.000Z","dependencies_parsed_at":"2022-08-19T10:21:08.512Z","dependency_job_id":null,"html_url":"https://github.com/k01ek/netbox-plugin-skeleton","commit_stats":null,"previous_names":[],"tags_count":null,"template":null,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k01ek%2Fnetbox-plugin-skeleton","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k01ek%2Fnetbox-plugin-skeleton/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k01ek%2Fnetbox-plugin-skeleton/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k01ek%2Fnetbox-plugin-skeleton/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k01ek","download_url":"https://codeload.github.com/k01ek/netbox-plugin-skeleton/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":225829093,"owners_count":17530662,"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","python","skeleton"],"created_at":"2024-11-22T01:30:03.068Z","updated_at":"2024-11-22T01:30:03.665Z","avatar_url":"https://github.com/k01ek.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# NetBox Plugin Skeleton\nThe skeleton for [Netbox](https://github.com/netbox-community/netbox) plugin.  \nBasically, it's a Django app skeleton, which contains all necessary (and unnecessary) files for building a new plugin.\n\n## Instructions\n### Donwload repositioriy\nYou can get this skeleton in two ways:\n1. Create your own GitHub repository using that one as a template [HowTo](https://docs.github.com/en/github/creating-cloning-and-archiving-repositories/creating-a-repository-from-a-template)\n2. Clone this repo or download it as an archive\n### Replace the name of the plugin in files and filenames with your new name\nUse repren script for replacing name. Set the new name of your plugin as an argument to the script.    \nExample:\n```\npython3 develop/repren.py my_new_plugin \nFound 29 files in: .\n- modify: ./Makefile: 3 matches\n- modify: ./MANIFEST.in: 1 matches\n- modify: ./setup.py: 1 matches\n- modify: ./README.me: 1 matches\n- modify: ./develop/configuration.py: 1 matches\n- modify: ./develop/docker-compose.yml: 4 matches\n- rename: ./netbox_newplugin/signals.py -\u003e ./my_new_plugin/signals.py\n- rename: ./netbox_newplugin/version.py -\u003e ./my_new_plugin/version.py\n- rename: ./netbox_newplugin/tamplate_content.py -\u003e ./my_new_plugin/tamplate_content.py\n- rename: ./netbox_newplugin/models.py -\u003e ./my_new_plugin/models.py\n- modify: ./netbox_newplugin/__init__.py: 1 matches\n- rename: ./netbox_newplugin/__init__.py -\u003e ./my_new_plugin/__init__.py\n- rename: ./netbox_newplugin/forms.py -\u003e ./my_new_plugin/forms.py\n- rename: ./netbox_newplugin/admin.py -\u003e ./my_new_plugin/admin.py\n- rename: ./netbox_newplugin/tables.py -\u003e ./my_new_plugin/tables.py\n- modify: ./netbox_newplugin/navigation.py: 1 matches\n- rename: ./netbox_newplugin/navigation.py -\u003e ./my_new_plugin/navigation.py\n- rename: ./netbox_newplugin/urls.py -\u003e ./my_new_plugin/urls.py\n- rename: ./netbox_newplugin/filters.py -\u003e ./my_new_plugin/filters.py\n- rename: ./netbox_newplugin/middleware.py -\u003e ./my_new_plugin/middleware.py\n- rename: ./netbox_newplugin/views.py -\u003e ./my_new_plugin/views.py\n- modify: ./netbox_newplugin/api/serializers.py: 1 matches\n- rename: ./netbox_newplugin/api/serializers.py -\u003e ./my_new_plugin/api/serializers.py\n- rename: ./netbox_newplugin/api/__init__.py -\u003e ./my_new_plugin/api/__init__.py\n- rename: ./netbox_newplugin/api/urls.py -\u003e ./my_new_plugin/api/urls.py\n- modify: ./netbox_newplugin/api/views.py: 1 matches\n- rename: ./netbox_newplugin/api/views.py -\u003e ./my_new_plugin/api/views.py\n- rename: ./netbox_newplugin/templates/netbox_newplugin/example -\u003e ./my_new_plugin/templates/my_new_plugin/example\nFound 29 files in: .\n- modify: ./README.me: 1 matches\n- modify: ./my_new_plugin/__init__.py: 2 matches\n```\n### Fix LICENSE file if you want\n### Fill in other information about the plugin\nSet name, url, author, description, etc in `README`, `setup.py`, and `__init__.py`\n### Commit changes\nIf the repo was cloned, just remove .git folder \n```\nrm -rf .git\n```\nand set your own repo like this\n```\ngit init\ngit add .\ngit commit -m 'init'\n```\n### Helpfulness\nUseful tools for developing the plugin you can find in the develop folder of this repo.\nUse Makefile to run a new development environment with docker in 3 commands. (docker and docker-compose required).   \n\n0. Set `PYTHON_VER` and `NETBOX_VER` in Makefile or environment\n```\nPYTHON_VER?=3.7\nNETBOX_VER?=v2.10.3\n```\n1. Build netbox container\n```\nmake cbuild\ndocker-compose -f ./develop/docker-compose.yml \\\n\t\t-p my_new_plugin build \\\n\t\t--build-arg netbox_ver=v2.10.3 \\\n\t\t--build-arg python_ver=3.7\npostgres uses an image, skipping\nredis uses an image, skipping\nBuilding netbox\n[+] Building 1.7s (15/15) FINISHED                                                                                                              \n...\nSuccessfully built ec6e8aabbaddb7c4386aef8f779d9ae7e8562f521e9041b7c20a3233f4c3a6d9\nBuilding worker\n[+] Building 0.2s (15/15) FINISHED                                                                                                              \n...\nSuccessfully built ec6e8aabbaddb7c4386aef8f779d9ae7e8562f521e9041b7c20a3233f4c3a6d9\n```\n2. Run netbox container\n```\nmake debug\n```\n3. Add django superuser\n```\nmake adduser\ndocker-compose -f ./develop/docker-compose.yml -p my_new_plugin run netbox python manage.py createsuperuser\nCreating my_new_plugin_netbox_run ... done\nUsername (leave blank to use 'root'): admin\nEmail address: \nPassword: \nPassword (again): \nSuperuser created successfully.\n```\n\n### Notes\nIf you got the error with git after change plugin name like this:  \n`fatal: unknown index entry format 0x196e0000`  \nuse following commands to fix it\n```\nrm -f .git/index\ngit reset\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk01ek%2Fnetbox-plugin-skeleton","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk01ek%2Fnetbox-plugin-skeleton","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk01ek%2Fnetbox-plugin-skeleton/lists"}