Exploring the Nautobot Shell
Nautobot includes a Python management shell within which objects can be directly queried, created, modified, and deleted. To enter the shell, run the following command:
nautobot@nautobot-dev:~$ nautobot-server nbshell
This will launch a lightly customized version of the built-in Django shell with all relevant Nautobot models pre-loaded.
Here’s an example output:
nautobot@nautobot-dev:~$ nautobot-server nbshell# Shell Plus Model Imports from constance.backends.database.models import Constance # ... A long list of auto-imported modules from django.db.models import Exists, OuterRef, Subquery # Django version 3.2.23 # Nautobot version 2.1.1 Python 3.8.18 (default, Dec 19 2023, 11:04:18) [GCC 12.2.0] on linux Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>>
Note
The Nautobot Shell provides direct access to Nautobot data and functions...