β Star us on GitHub β your support motivates us a lot! ππ
Everyone loves netmiko cause it's the best at what it can do, so instead of reinventing the wheel we decided to add couple of sticks in to it by implementing some Quality-of-life features. NetDriver is a network device automation framework that enables CLI command execution through HTTP RESTful APIs. With features like session persistence for efficiency a command queue to avoid configuration conflicts and an HTTP RESTful API for simple third-party integration. With its plugin architecture which combines automation scalability and contemporary network management in a single framework it offers high concurrency and is built on top of AsyncSSH for your convinience.
NetDriver adopts a Monorepo architecture consisting of multiple sub-projects:
- netdriver-agent - Provides REST APIs for device connectivity testing and command execution
- netdriver-simunet - Simulates network device terminals for automated testing and other scenarios requiring device emulation
Features:
- π HTTP RESTful API : Easy integration with third-party platforms
- π Session Management : Customizable session persistence for improved efficiency, eliminating repeated connections per command
- π Command Queue : Ensures sequential command execution on devices, preventing configuration errors and failures caused by concurrent modifications
- β‘ AsyncSSH Foundation : Superior concurrency capabilities through asynchronous SSH implementation
- π Plugin Architecture : Simplified and accelerated development of new vendor support
| Feature | NetDriver | Netmiko | 
|---|---|---|
| HTTP RESTful API for third-party integration | β | β | 
| Session persistence with customizable duration | β | β | 
| Python-based implementation | β | β | 
| Command execution queue to prevent concurrent conflicts | β | β | 
| Plugin architecture for easier device support development | β | β | 
| Standard CLI automation | β | β | 
| Open source | β | β | 
| AsyncSSH-based architecture for high concurrency | β | β | 
netdriver/
βββ bases/ 
β   βββ netdriver/
β       βββ agent/          # netdirver-agent app
β       βββ simunet/        # netdriver-simunet app 
βββ components/
β   βββ netdriver/
β       βββ client/         # SSH client with session management 
β       βββ exception/      # Exception handling and error codes
β       βββ log/           # Logging utilities
β       βββ plugin/        # Plugin system core
β       βββ plugins/       # Device-specific plugins
β       βββ server/        # SSH server of simulated devices
β       βββ textfsm/       # Enhanced Textfsm
β       βββ utils/         # Utility functions
βββ config/                # Configuration files
βββ tests/                 # Test suites
βββ pyproject.toml        # Project metadata and dependencies
Fallow this steps to build our package:
- Python 3.12 or higher
- Poetry for dependency management
Recommended using pyenv to manage and install Python.
Install Python build dependencies
sudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \
libbz2-dev libreadline-dev libsqlite3-dev curl git \
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-devInstall pyenv
curl -fsSL https://pyenv.run | bashConfigure ~/.bashrc file by appending the following text to the end
# Load pyenv automatically by appending
# the following to
# ~/.bash_profile if it exists, otherwise ~/.bashrc (for login shells)
# and ~/.bashrc (for interactive shells) :
export PYENV_ROOT="$HOME/.pyenv"
[[ -d $PYENV_ROOT/bin ]] && export PATH="$PYENV_ROOT/bin:$PATH"
eval "$(pyenv init - bash)"Apply the changes to your current shell session
source ~/.bashrcVerify pyenv installation
$ pyenv --version
pyenv 2.6.8Reference: https://github.com/pyenv/pyenv/wiki#suggested-build-environment
Install Python (recommended version: 3.12.7)
# List available versions
pyenv install --list
# Install Python 3.12.7
pyenv install 3.12.7
# Set as global version
pyenv global 3.12.7
# Verify installation
python --version
Python 3.12.7Poetry is the default build and dependency management tool for this project
# Install Poetry
curl -sSL https://install.python-poetry.org | python3 -
# Configure ~/.bashrc
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Verify installation
poetry --version
Poetry (version 1.8.3)
# Install Poetry plugins
poetry self add poetry-multiproject-plugin
poetry self add poetry-polylith-pluginReferences:
poetry installpoetry run agentOnce the Agent service is started, you can access the FastAPI OpenAPI interface through a web browser to test API calls.
poetry run simunetOnce the Simunet service is started, you can access the simulated devices through SSH clients or the Agent.
Configuration files are located in the config/ directory:
- config/agent/agent.yml- Agent service configuration
- config/simunet/simunet.yml- Simulation network configuration
Run all tests:
poetry run pytestRun unit tests only:
poetry run pytest -m unitRun integration tests only:
poetry run pytest -m integrationYour contributions matter!Our project can always be better so we would be happy to recive your help!Please take a look at contributing guide before submiting a pull request! For questions, issues, or feature requests, please open an issue on the project repository.
- Follow PEP 8 style guidelines
- Add tests for new features
- Update documentation as needed
- Ensure all tests pass before submitting PR
This project is licensed under the Apache License 2.0.
We look forward to assisting you and ensuring your experience with our products is successful and enjoyable!


