Skip to content

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

@jeremystretch

Description

@jeremystretch

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

Metadata

Metadata

Assignees

Labels

status: acceptedThis issue has been accepted for implementationtype: featureIntroduction of new functionality to the application

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions