CloudCommunityEnterprise
Diode Python SDK - Entity Examples
Source: NetBox v4.5.0 Generated: 2026-02-17 23:39:38Z
Prerequisites
- Python 3.10 or later
- Diode SDK for Python
Installation
pip install netboxlabs-diode-sdk
Configuration
Each example uses constants for configuration. You can modify these in the example code:
TARGET = "grpc://localhost:8080/diode"
CLIENT_ID = "diode"
CLIENT_SECRET = "changeme"
Quick Start
Each entity example is a standalone Python file. To run an example:
python examples/device.py
Example Patterns
Each example module includes three pattern functions:
- minimal: Only required fields (using flat string references)
- extended: Required fields plus common optional fields
- explicit: Fully nested objects with all common fields
Switch between patterns by uncommenting the desired function call in main().
Available Entity Examples
Circuits
- Circuit
- CircuitGroup
- CircuitGroupAssignment
- CircuitTermination
- CircuitType
- Provider
- ProviderAccount
- ProviderNetwork
- VirtualCircuit
- VirtualCircuitTermination
- VirtualCircuitType
DCIM
- Cable
- CablePath
- CableTermination
- ConsolePort
- ConsoleServerPort
- Device
- DeviceBay
- DeviceRole
- DeviceType
- FrontPort
- Interface
- InventoryItem
- InventoryItemRole
- Location
- Manufacturer
- Module
- ModuleBay
- ModuleType
- ModuleTypeProfile
- Platform
- PowerFeed
- PowerOutlet
- PowerPanel
- PowerPort
- Rack
- RackReservation
- RackRole
- RackType
- RearPort
- Region
- Site
- SiteGroup
- VirtualChassis
- VirtualDeviceContext
Extras
IPAM
- ASN
- ASNRange
- Aggregate
- FHRPGroup
- FHRPGroupAssignment
- IPAddress
- IPRange
- MACAddress
- Prefix
- RIR
- Role
- RouteTarget
- Service
- VLAN
- VLANGroup
- VLANTranslationPolicy
- VLANTranslationRule
- VRF
Other
Tenancy
VPN
- IKEPolicy
- IKEProposal
- IPSecPolicy
- IPSecProfile
- IPSecProposal
- L2VPN
- L2VPNTermination
- Tunnel
- TunnelGroup
- TunnelTermination