# NetDriver
<a name="top"></a>
[](https://www.python.org/)
[](https://python-poetry.org/)
[](./LICENSE)
[]()
[]()
[]()
[](https://github.com/PanMarkCake/netdriver/commits/main)
[](https://github.com/PanMarkCake/REPO/releases/tag/v0.1.0)

⭐ Star us on GitHub — your support motivates us a lot! 🙏😊
[](https://x.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/Abblix/Oidc.Server%20%23OpenIDConnect%20%23Security%20%23Authentication)
[](https://www.facebook.com/sharer/sharer.php?u=https://github.com/Abblix/Oidc.Server)
[](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/Abblix/Oidc.Server)
[](https://www.reddit.com/submit?title=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/Abblix/Oidc.Server)
[](https://t.me/share/url?url=https://github.com/Abblix/Oidc.Server&text=Check%20out%20this%20project%20on%20GitHub)
# Table of Contents
- [About](#about)
- [Updates](#updates)
- [Comparison](#comparison)
- [Build](#Build)
- [Usage](#usage)
- [Contributions](#contributions)
- [License](#license)
- [Contacts](#contacts)
## About
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
## Comparison
| 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** | ✅ | ❌ |
## Project Structure
```
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
```
## Build
Fallow this steps to build our package:
### Prerequisites
- Python 3.12 or higher
- Poetry for dependency management
## Development Environment Setup
### Python Installation
Recommended using pyenv to manage and install Python.
Install Python build dependencies
```bash
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-dev
```
Install pyenv
```bash
curl -fsSL https://pyenv.run | bash
```
Configure `~/.bashrc` file by appending the following text to the end
```bash
# 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
```bash
source ~/.bashrc
```
Verify pyenv installation
```bash
$ pyenv --version
pyenv 2.6.8
```
> Reference: <https://github.com/pyenv/pyenv/wiki#suggested-build-environment>
Install Python (recommended version: 3.12.7)
```bash
# 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.7
```
### Poetry Installation
Poetry is the default build and dependency management tool for this project
```bash
# 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-plugin
```
> References:
> - <https://python-poetry.org/docs/#installing-with-the-official-installer>
> - <https://davidvujic.github.io/python-polylith-docs/>
### Install Development Dependencies
```bash
poetry install
```
## Usage
### Start the Agent Service
```bash
poetry run agent
```
Once the Agent service is started, you can access the FastAPI OpenAPI interface through a web browser to test API calls.
http://localhost:8000/docs

### Start the Simulation Network Service
```bash
poetry run simunet
```
Once the Simunet service is started, you can access the simulated devices through SSH clients or the Agent.


## Configuration
Configuration files are located in the `config/` directory:
- `config/agent/agent.yml` - Agent service configuration
- `config/simunet/simunet.yml` - Simulation network configuration
## Testing
Run all tests:
```bash
poetry run pytest
```
Run unit tests only:
```bash
poetry run pytest -m unit
```
Run integration tests only:
```bash
poetry run pytest -m integration
```
##🤝 Contributions and Requests
Your contributions matter!Our project can always be better so we would be happy to recive your help!Please take a look at [contributing](./CONTRIBUTING.md) guide before submiting a pull request!
For questions, issues, or feature requests, please open an issue on the project repository.
### Development Guidelines
1. Follow PEP 8 style guidelines
2. Add tests for new features
3. Update documentation as needed
4. Ensure all tests pass before submitting PR
## Support
## 📃 License
This project is licensed under the [Apache License 2.0](LICENSE).
## Authors
- vincent@byntra.se
- bobby@byntra.se
- sam@byntra.se
- mark@byntra.se
## 🗨️ Contacts
We look forward to assisting you and ensuring your experience with our products is successful and enjoyable!
[Back to top](#top)
Raw data
{
"_id": null,
"home_page": null,
"name": "netdriver",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.12",
"maintainer_email": null,
"keywords": "network, automation, cli, ssh, device, driver",
"author": "vincent@byntra.se",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/58/f3/42c44a191ae9b5353aac61e2f20faffd208c3b2164097dd28bb205c88866/netdriver-0.1.12.tar.gz",
"platform": null,
"description": "# NetDriver\n<a name=\"top\"></a>\n\n[](https://www.python.org/)\n[](https://python-poetry.org/)\n[](./LICENSE)\n[]()\n[]()\n[]()\n[](https://github.com/PanMarkCake/netdriver/commits/main)\n[](https://github.com/PanMarkCake/REPO/releases/tag/v0.1.0)\n\n\n\u2b50 Star us on GitHub \u2014 your support motivates us a lot! \ud83d\ude4f\ud83d\ude0a\n\n[](https://x.com/intent/tweet?text=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/Abblix/Oidc.Server%20%23OpenIDConnect%20%23Security%20%23Authentication)\n[](https://www.facebook.com/sharer/sharer.php?u=https://github.com/Abblix/Oidc.Server)\n[](https://www.linkedin.com/sharing/share-offsite/?url=https://github.com/Abblix/Oidc.Server)\n[](https://www.reddit.com/submit?title=Check%20out%20this%20project%20on%20GitHub:%20https://github.com/Abblix/Oidc.Server)\n[](https://t.me/share/url?url=https://github.com/Abblix/Oidc.Server&text=Check%20out%20this%20project%20on%20GitHub)\n\n# Table of Contents\n- [About](#about)\n- [Updates](#updates)\n- [Comparison](#comparison)\n- [Build](#Build)\n- [Usage](#usage)\n- [Contributions](#contributions)\n- [License](#license)\n- [Contacts](#contacts)\n\n## About\nEveryone 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.\nNetDriver is a network device automation framework that enables CLI command execution through HTTP RESTful APIs.\nWith 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 \nfor your convinience.\n\nNetDriver adopts a Monorepo architecture consisting of multiple sub-projects:\n\n- **netdriver-agent** - Provides REST APIs for device connectivity testing and command execution\n- **netdriver-simunet** - Simulates network device terminals for automated testing and other scenarios requiring device emulation\n\nFeatures:\n\n- \ud83c\udf10 **HTTP RESTful API** : Easy integration with third-party platforms\n- \ud83d\udd04 **Session Management** : Customizable session persistence for improved efficiency, eliminating repeated connections per command\n- \ud83d\udccb **Command Queue** : Ensures sequential command execution on devices, preventing configuration errors and failures caused by concurrent modifications\n- \u26a1 **AsyncSSH Foundation** : Superior concurrency capabilities through asynchronous SSH implementation\n- \ud83d\udd0c **Plugin Architecture** : Simplified and accelerated development of new vendor support\n\n## Comparison\n\n| Feature | NetDriver | Netmiko |\n|------------|:--------:|:----:|\n| **HTTP RESTful API for third-party integration** | \u2705 | \u274c |\n| **Session persistence with customizable duration** | \u2705 | \u274c |\n| **Python-based implementation** | \u2705 | \u2705 |\n| **Command execution queue to prevent concurrent conflicts** | \u2705 | \u274c |\n| **Plugin architecture for easier device support development** | \u2705 | \u274c |\n| **Standard CLI automation** | \u2705 | \u2705 |\n| **Open source** | \u2705 | \u2705 |\n| **AsyncSSH-based architecture for high concurrency** | \u2705 | \u274c |\n\n \n\n## Project Structure\n\n```\nnetdriver/\n\u251c\u2500\u2500 bases/ \n\u2502 \u2514\u2500\u2500 netdriver/\n\u2502 \u251c\u2500\u2500 agent/ # netdirver-agent app\n\u2502 \u2514\u2500\u2500 simunet/ # netdriver-simunet app \n\u251c\u2500\u2500 components/\n\u2502 \u2514\u2500\u2500 netdriver/\n\u2502 \u251c\u2500\u2500 client/ # SSH client with session management \n\u2502 \u251c\u2500\u2500 exception/ # Exception handling and error codes\n\u2502 \u251c\u2500\u2500 log/ # Logging utilities\n\u2502 \u251c\u2500\u2500 plugin/ # Plugin system core\n\u2502 \u251c\u2500\u2500 plugins/ # Device-specific plugins\n\u2502 \u251c\u2500\u2500 server/ # SSH server of simulated devices\n\u2502 \u251c\u2500\u2500 textfsm/ # Enhanced Textfsm\n\u2502 \u2514\u2500\u2500 utils/ # Utility functions\n\u251c\u2500\u2500 config/ # Configuration files\n\u251c\u2500\u2500 tests/ # Test suites\n\u2514\u2500\u2500 pyproject.toml # Project metadata and dependencies\n```\n\n## Build\n\nFallow this steps to build our package:\n\n### Prerequisites\n\n- Python 3.12 or higher\n- Poetry for dependency management\n\n## Development Environment Setup\n\n### Python Installation\n\nRecommended using pyenv to manage and install Python.\n\nInstall Python build dependencies\n\n```bash\nsudo apt update; sudo apt install build-essential libssl-dev zlib1g-dev \\\nlibbz2-dev libreadline-dev libsqlite3-dev curl git \\\nlibncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev\n```\n\nInstall pyenv\n\n```bash\ncurl -fsSL https://pyenv.run | bash\n```\n\nConfigure `~/.bashrc` file by appending the following text to the end\n\n```bash\n# Load pyenv automatically by appending\n# the following to\n# ~/.bash_profile if it exists, otherwise ~/.bashrc (for login shells)\n# and ~/.bashrc (for interactive shells) :\n\nexport PYENV_ROOT=\"$HOME/.pyenv\"\n[[ -d $PYENV_ROOT/bin ]] && export PATH=\"$PYENV_ROOT/bin:$PATH\"\neval \"$(pyenv init - bash)\"\n```\n\nApply the changes to your current shell session\n\n```bash\nsource ~/.bashrc\n```\n\nVerify pyenv installation\n\n```bash\n$ pyenv --version\npyenv 2.6.8\n```\n\n> Reference: <https://github.com/pyenv/pyenv/wiki#suggested-build-environment>\n\nInstall Python (recommended version: 3.12.7)\n\n```bash\n# List available versions\npyenv install --list\n# Install Python 3.12.7\npyenv install 3.12.7\n# Set as global version\npyenv global 3.12.7\n# Verify installation\npython --version\nPython 3.12.7\n```\n\n### Poetry Installation\n\nPoetry is the default build and dependency management tool for this project\n\n```bash\n# Install Poetry\ncurl -sSL https://install.python-poetry.org | python3 -\n\n# Configure ~/.bashrc\necho 'export PATH=\"$HOME/.local/bin:$PATH\"' >> ~/.bashrc\nsource ~/.bashrc\n\n# Verify installation\npoetry --version\nPoetry (version 1.8.3)\n\n# Install Poetry plugins\npoetry self add poetry-multiproject-plugin\npoetry self add poetry-polylith-plugin\n```\n\n> References:\n> - <https://python-poetry.org/docs/#installing-with-the-official-installer>\n> - <https://davidvujic.github.io/python-polylith-docs/>\n\n### Install Development Dependencies\n\n```bash\npoetry install\n```\n\n## Usage\n\n### Start the Agent Service\n\n```bash\npoetry run agent\n```\n\nOnce the Agent service is started, you can access the FastAPI OpenAPI interface through a web browser to test API calls.\n\nhttp://localhost:8000/docs\n\n\n\n### Start the Simulation Network Service\n\n```bash\npoetry run simunet\n```\n\nOnce the Simunet service is started, you can access the simulated devices through SSH clients or the Agent.\n\n\n\n\n\n## Configuration\n\nConfiguration files are located in the `config/` directory:\n\n- `config/agent/agent.yml` - Agent service configuration\n- `config/simunet/simunet.yml` - Simulation network configuration\n\n## Testing\n\nRun all tests:\n\n```bash\npoetry run pytest\n```\n\nRun unit tests only:\n\n```bash\npoetry run pytest -m unit\n```\n\nRun integration tests only:\n\n```bash\npoetry run pytest -m integration\n```\n\n##\ud83e\udd1d Contributions and Requests\n\nYour contributions matter!Our project can always be better so we would be happy to recive your help!Please take a look at [contributing](./CONTRIBUTING.md) guide before submiting a pull request!\nFor questions, issues, or feature requests, please open an issue on the project repository.\n\n### Development Guidelines\n\n1. Follow PEP 8 style guidelines\n2. Add tests for new features\n3. Update documentation as needed\n4. Ensure all tests pass before submitting PR\n\n## Support\n\n\n\n## \ud83d\udcc3 License\n\nThis project is licensed under the [Apache License 2.0](LICENSE).\n\n## Authors\n\n- vincent@byntra.se\n- bobby@byntra.se\n- sam@byntra.se\n- mark@byntra.se\n\n## \ud83d\udde8\ufe0f Contacts\n\nWe look forward to assisting you and ensuring your experience with our products is successful and enjoyable!\n\n[Back to top](#top)\n\n",
"bugtrack_url": null,
"license": "Apache-2.0",
"summary": "The driver for network devices, which interact with network device using CLI.",
"version": "0.1.12",
"project_urls": {
"Documentation": "https://github.com/OpenSecFlow/netdriver#readme",
"Homepage": "https://github.com/OpenSecFlow/netdriver",
"Repository": "https://github.com/OpenSecFlow/netdriver"
},
"split_keywords": [
"network",
" automation",
" cli",
" ssh",
" device",
" driver"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "58f342c44a191ae9b5353aac61e2f20faffd208c3b2164097dd28bb205c88866",
"md5": "366ac16ff33b1a115ecd65dcc0706444",
"sha256": "c01ad097135a8bbb5fc33266c8ac2086e30e330a8189a10f5069dca1d2e6fd62"
},
"downloads": -1,
"filename": "netdriver-0.1.12.tar.gz",
"has_sig": false,
"md5_digest": "366ac16ff33b1a115ecd65dcc0706444",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.12",
"size": 149058,
"upload_time": "2025-10-21T04:00:26",
"upload_time_iso_8601": "2025-10-21T04:00:26.652888Z",
"url": "https://files.pythonhosted.org/packages/58/f3/42c44a191ae9b5353aac61e2f20faffd208c3b2164097dd28bb205c88866/netdriver-0.1.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-21 04:00:26",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "OpenSecFlow",
"github_project": "netdriver#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "netdriver"
}