Skip to main content

LAMP

Overview

LAMP is an interactive command-line interface built on top of pyATS/Genie that enables users to connect to network devices and perform operations interactively. Think of it as a REPL (Read-Eval-Print Loop) for network automation—where you can execute commands, parse outputs, run APIs, and configure devices in real-time, all while LAMP automatically records your session into reusable Blitz YAML automation scripts.

LAMP bridges the gap between manual device interaction and automated testing. Instead of writing pyATS test scripts from scratch, you can work directly with your devices through LAMP's intuitive command interface. Every action you perform is automatically captured and can be replayed later, making it easy to convert exploratory work into production-ready automation.

Core Commands

  • execute - Run CLI commands on devices and capture output
  • configure - Apply configuration changes to devices
  • parse - Execute commands and parse output into structured data using Genie parsers
  • api - Execute Genie APIs for higher-level operations
  • bash_console - Interact with device bash/shell consoles
  • replay - Re-run previously recorded LAMP sessions (via Blitz YAML files)
  • sleep - Add delays between operations

Key Features

  • Interactive Shell Capabilities: Command history, autocompletion, and inline editing for smooth user experience
  • Automatic Recording: Every operation is automatically saved as Blitz YAML, turning interactive sessions into reusable automation scripts
  • Replay Workflows: Use the replay command to re-execute previously recorded sessions, enabling rapid iteration and workflow automation
  • Variables and Loops: Support for parameterized commands, variables, and loops to work with multiple devices efficiently
  • Include/Exclude Filters: Powerful filtering options for command outputs to focus on specific data

Installation

Prerequisites

  • Python >= 3.10
  • pyATS and Genie

For Development

git clone <repository-url>
cd genielamp
make develop

For Users

pip install genie

Starting LAMP

genie lamp

Developer's Guide

Code Quality Tools

When developing, ensure your code follows these standards:

  • black: Code formatting
  • isort: Import sorting
  • ruff: Linting
  • mypy: Type checking
  • lint-imports: Import linting

These checks are enforced in the CI pipeline.

Testing

Tests are written using pytest and located in the tests/ directory. Run tests with:

cd genielamp
pytest

Development Commands

# Setup development environment
make develop

# Format code
isort src/ tests/
black src/ tests/

# Check linting
ruff check src/ tests/

# Type checking
mypy src/

# Import linting
lint-imports --config importlinter.ini

# Run tests
pytest

How to Write a Changelog for Your Contribution

Every contribution to LAMP must include a changelog file describing the changes made. This helps maintain clear documentation of all modifications to the project.

1. Follow the Changelog Format

Familiarize yourself with the examples at changelogs/undistributed/template.rst. Changelogs must be written in the same style as the examples found there:

--------------------------------------------------------------------------------
                                New
--------------------------------------------------------------------------------
* <component>
    * <describe the changes>

--------------------------------------------------------------------------------
                                Fix
--------------------------------------------------------------------------------
* <component>
    * <describe the changes>

Example:

--------------------------------------------------------------------------------
                                New
--------------------------------------------------------------------------------
* UI
    * Added support for include/exclude filters with -i and -e flags

2. Create a Uniquely Named Changelog File

The changelog (singular) that accompanies a contribution must have a unique file name and be placed in changelogs/undistributed/.

To generate a unique file name, use the following bash/terminal command to generate a sufficiently unique timestamp (Linux and Mac):

$ date "+%Y%m%d%H%M%S"

Create your changelog file with a short description and the timestamp:

changelogs/undistributed/changelog_<short_description>_<timestamp>.rst

Example:

changelogs/undistributed/changelog_execute_filters_20200807212611.rst

Metadata

Release files for genie.lamp 26.10

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for genie.lamp 26.10
File Interpreter ABI Platform Actions
genie_lamp-26.10-py3-none-any.whl Python 3 none any Details for genie_lamp-26.10-py3-none-any.whl

Release files / genie_lamp-26.10-py3-none-any.whl

Download URL genie_lamp-26.10-py3-none-any.whl
Size 290.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
85a1bec36478b9dc6a2f14023cdf9062d948c14760850379b389f9cc96fb8a0b
BLAKE2b-256 checksum
How to use checksums
039d5d8083316542eee900af06ccaa21ec436b5f8ab58f36244c033fd3d60a7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.0

Security for genie.lamp 26.10

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page