Prompts
Prompts¶
When you create a package, you are prompted to enter these values.
Templated Values¶
The following appear in various parts of your generated project.
- plugin_name
- The base name of your plugin (without "NetBox" or "Plugin"). This is used to initialize most of the other settings.
- project_name
- The name of your new Python package project. This is used in documentation, so spaces and any characters are fine here.
- hyphenated
- The name of your Python package for PyPI, also as the repository name of GitHub. Typically, it is the slugified version of project_name.
- underscored
- The name of the python module and directory in the project.
- project_short_description
- A 1-sentence description of what your Python package does.
- full_name
- Your full name.
- Your email address.
- github_username
- Your GitHub username (or organization name).
- version
- The starting version number of the package.
Options¶
The following package configuration options set up different features for your project.
- open_source_license
- Choose a license. Options: [1. Apache-2.0, 2. MIT, 3. BSD, 4. ISC, 5. GPL-3.0-only, 6. Not open source]
- include_rest_api
- Include REST API support for your plugin. Options: [1. yes, 2. no]
When enabled, generates a complete REST API structure with:- Serializers for NetBox model serialization
- ViewSets for API endpoints
- URL routing configuration
- Integration with NetBox's REST API framework
- include_graphql
- Include GraphQL support for your plugin. Options: [1. yes, 2. no]
When enabled, generates GraphQL schema and resolvers:- GraphQL type definitions for your models
- Query resolvers for data fetching
- Integration with NetBox's GraphQL API
Additional Configuration¶
Trusted Publishing (Recommended)¶
Modern plugin projects should use PyPI Trusted Publishing instead of API tokens. See the Publishing Guide for detailed setup instructions.
Legacy API Tokens (Not Recommended)¶
If you cannot use trusted publishing, you'll need to configure GitHub repository secrets:
- Go to your repository > Settings > Secrets and variables > Actions
- Add the following secrets:
PERSONAL_TOKEN- Required for publishing documentation to GitHub Pages (How to create)TEST_PYPI_API_TOKEN- Required for publishing to TestPyPI (How to create)PYPI_API_TOKEN- Required for publishing to PyPI (How to create)
Security Notice
API tokens are being phased out in favor of trusted publishing for improved security. Consider migrating to trusted publishing if possible.