Metadata-Version: 2.4
Name: netbox-types
Version: 4.5.4.1
Summary: NetBox type stubs and modules for type checking and development
Author-email: Retigra <info@retigra.nl>, Wouter de Bruijn <wouter@hedium.nl>
License: Apache-2.0
Project-URL: Homepage, https://github.com/retigra/netbox-types
Project-URL: Documentation, https://github.com/retigra/netbox-types/blob/main/README.md
Project-URL: Source, https://github.com/retigra/netbox-types
Project-URL: Issues, https://github.com/retigra/netbox-types/issues
Keywords: netbox,types,stubs,type hints,type checking,development
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorama==0.4.6
Requires-Dist: django==5.2.11
Requires-Dist: django-cors-headers==4.9.0
Requires-Dist: django-debug-toolbar==6.2.0
Requires-Dist: django-filter==25.2
Requires-Dist: django-graphiql-debug-toolbar==0.2.0
Requires-Dist: django-htmx==1.27.0
Requires-Dist: django-mptt==0.18.0
Requires-Dist: django-pglocks==1.0.4
Requires-Dist: django-prometheus==2.4.1
Requires-Dist: django-redis==6.0.0
Requires-Dist: django-rich==2.2.0
Requires-Dist: django-rq==3.2.2
Requires-Dist: django-storages==1.14.6
Requires-Dist: django-tables2==2.8.0
Requires-Dist: django-taggit==6.1.0
Requires-Dist: django-timezone-field==7.2.1
Requires-Dist: djangorestframework==3.16.1
Requires-Dist: drf-spectacular==0.29.0
Requires-Dist: drf-spectacular-sidecar==2026.3.1
Requires-Dist: feedparser==6.0.12
Requires-Dist: gunicorn==25.1.0
Requires-Dist: jinja2==3.1.6
Requires-Dist: jsonschema==4.26.0
Requires-Dist: markdown==3.10.2
Requires-Dist: mkdocs==1.6.1
Requires-Dist: mkdocs-material==9.7.3
Requires-Dist: mkdocstrings==1.0.3
Requires-Dist: mkdocstrings-python==2.0.3
Requires-Dist: netaddr==1.3.0
Requires-Dist: nh3==0.3.3
Requires-Dist: pillow==12.1.1
Requires-Dist: psycopg[c,pool]==3.3.3
Requires-Dist: pyyaml==6.0.3
Requires-Dist: requests==2.32.5
Requires-Dist: rq==2.7.0
Requires-Dist: social-auth-app-django==5.7.0
Requires-Dist: social-auth-core==4.8.5
Requires-Dist: sorl-thumbnail==13.0.0
Requires-Dist: strawberry-graphql==0.307.1
Requires-Dist: strawberry-graphql-django==0.79.0
Requires-Dist: svgwrite==1.4.3
Requires-Dist: tablib==3.9.0
Requires-Dist: tzdata==2025.3
Dynamic: license-file

# netbox-types

A helper package for NetBox plugin and script developers that provides
development-time type hints and module resolution.

## Purpose

`netbox-types` makes it possible to install NetBox components as development
dependencies, enabling proper IDE support, type checking, and module resolution
when developing NetBox plugins and custom scripts. This allows you to import and
use NetBox modules like `dcim`, `ipam`, `circuits`, and others during
development without having a full NetBox installation.

## Important Note

**This package is a republish of the official NetBox source code in the form of
a types package.** The source code does not differ from NetBox itself - it's
simply repackaged to be installable as a development dependency.

## Installation

Install netbox-types as a **development dependency only**:

```bash
# Using uv
uv add --dev netbox-types

# Using pip
pip install --dev netbox-types

# Using poetry
poetry add --group dev netbox-types
```

⚠️ **Important**: Do NOT install this package in production environments. When
your plugin or script is deployed to an actual NetBox instance, the real NetBox
modules will be available via internal imports.

## Usage

### During Development

With netbox-types installed, you can develop your plugins and scripts with full
IDE support:

```python
# Your IDE will now resolve these imports during development
from dcim.models import Device, Site
from ipam.models import IPAddress, Prefix
from circuits.models import Circuit, Provider
from extras.scripts import Script
```

### In Production

When deployed to NetBox, your code uses the exact same imports, but they resolve
to the actual NetBox installation:

```python
# Same imports work in production - no changes needed!
from dcim.models import Device, Site
from ipam.models import IPAddress, Prefix
```

## Common Use Cases

- **Plugin Development**: Develop NetBox plugins with full type hints and
  autocomplete
- **Custom Scripts**: Write custom scripts with IDE support for NetBox models
- **Testing**: Run unit tests for your NetBox extensions locally
- **CI/CD**: Install in development mode for linting and type checking in your
  pipeline

## Example Project Setup

```toml
# pyproject.toml
[project]
name = "my-netbox-plugin"
dependencies = [
    # Your plugin's runtime dependencies (no netbox-types here!)
]

[project.optional-dependencies]
dev = [
    "netbox-types",
    "pytest",
    "ruff",
]
```

## Reporting Issues

If you encounter problems with missing modules, incorrect type hints, or any
other issues related to this package, please report them directly to this
repository. Since this package mirrors the NetBox source structure, issues are
typically related to:

- Missing modules that should be included
- Packaging or distribution problems
- Version mismatches

For issues with NetBox itself (not this types package), please report to the
[official NetBox repository](https://github.com/netbox-community/netbox).

## Version Compatibility

This package follows NetBox's versioning. Install a version that matches your
target NetBox version:

```bash
# For NetBox 4.0.x
uv add --dev netbox-types==4.0.*

# For NetBox 3.7.x
uv add --dev netbox-types==3.7.*
```

## What's Included

This package includes all standard NetBox modules:

- `circuits` - Circuit and provider management
- `core` - Core NetBox functionality
- `dcim` - Data center infrastructure management
- `extras` - Custom fields, scripts, webhooks, etc.
- `ipam` - IP address management
- `tenancy` - Multi-tenancy support
- `utilities` - Helper utilities and base classes
- `virtualization` - Virtual machine management
- `vpn` - VPN tunnel and termination management
- `wireless` - Wireless LAN management
- And more...

## License

This package contains NetBox source code and is distributed under the same
license as NetBox. See the [LICENSE.txt](netbox/LICENSE.txt) file for details.

## Related Links

- [NetBox Official Documentation](https://docs.netbox.dev/)
- [NetBox Plugin Development Guide](https://docs.netbox.dev/en/stable/plugins/development/)
- [NetBox GitHub Repository](https://github.com/netbox-community/netbox)
