Extend nbshell to allow passing Python code to be executed #4338

Closed
opened 2025-12-29 18:34:55 +01:00 by adam · 0 comments
Owner

Originally created by @jeremystretch on GitHub (Dec 7, 2020).

Originally assigned to: @jeremystretch on GitHub.

Environment

  • Python version: 3.6.9
  • NetBox version: 2.9.10

Proposed Functionality

Add a -c/--command argument to the nbshell to allow passing Python code directly (replicating the functionality of Django's built-in shell command).

Use Case

Provides better support for one-offs by removing the need to pipe code via stdin.

Database Changes

None

External Dependencies

None

Originally created by @jeremystretch on GitHub (Dec 7, 2020). Originally assigned to: @jeremystretch on GitHub. ### Environment * Python version: 3.6.9 * NetBox version: 2.9.10 ### Proposed Functionality Add a `-c`/`--command` argument to the `nbshell` to allow passing Python code directly (replicating the functionality of Django's built-in `shell` command). ### Use Case Provides better support for one-offs by removing the need to pipe code via stdin. ### Database Changes None ### External Dependencies None
adam added the status: acceptedtype: feature labels 2025-12-29 18:34:55 +01:00
adam closed this issue 2025-12-29 18:34:55 +01:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#4338