Skip to main content

Modern async Python toolkit for network device automation

Project description


Networka: Eierlegende Wollmilchsau of network operations — optimized for your daily workflows.

Python 3.11+ Platform License: Apache-2.0 Code style: ruff Type checked with mypy CI Docs

Networka is a modern async CLI tool for automating network devices across multiple vendors. Built with async/await patterns for high performance and reliability. Designed for network engineers who want fast, scalable automation with full cross-platform support.


The Networka Monologue

“People ask the question…
what’s a Networka?

And I tell 'em —
it's not about cables, configs, and pings.
Oh no.
There’s more to it than that, my friend.

We all like a bit of the good life —
some the uptime, some the security,
others the automation, the visibility, or the compliance.

But a Networka, oh, they're different.
Why?
Because a real Networka wants the f*ing lot.”

(inspired by: RockNRolla)

Getting Started

Features

Core Capabilities

  • Multi-vendor network automation: Native support for MikroTik RouterOS, Cisco IOS/IOS-XE/NX-OS, Arista EOS, Juniper JunOS, and more
  • Scalable device management: Execute commands across individual devices or groups concurrently with async/await architecture
  • Cross-platform compatibility: Full support for Linux, macOS, and Windows environments
  • Flexible configuration: YAML and CSV configuration options with powerful device tagging and grouping

Operational Features

  • Command execution: Run single commands or predefined sequences across devices and groups
  • File management: Upload/download files to/from network devices with verification and error handling
  • Device backup: Automated configuration and comprehensive backups with vendor-specific implementations
  • Firmware management: Upgrade, downgrade, and BIOS operations with platform validation
  • SSH session management: Direct SSH access with tmux integration for interactive sessions

Advanced Features

  • Intelligent completions: Context-aware shell completions for devices, groups, and sequences
  • Vendor-aware sequences: Predefined command sets optimized for different network platforms
  • Results management: Organized storage with multiple output formats and automatic timestamping
  • Configuration validation: Schema-based validation with detailed error reporting
  • Credential management: Secure credential handling via environment variables with device-specific overrides

Developer & Integration Features

  • Type safety: Full mypy type checking for reliability and maintainability
  • Modern architecture: Built with async/await patterns for high performance
  • Extensible design: Plugin-friendly architecture for adding new vendors and operations
  • Rich output: Professional CLI interface with color coding and structured information display

Installation

System Requirements

  • Operating System: Linux, macOS, or Windows
  • Python: 3.11, 3.12, or 3.13
  • Network Access: SSH connectivity to target devices
  • Package Manager: uv (recommended) or pip

Quick Install (recommended)

Not on PyPI yet — install from GitHub.

# Recommended (isolated, user-wide)
uv tool install git+https://github.com/narrowin/networka.git

# Alternative
pipx install git+https://github.com/narrowin/networka.git

# Verify installation
nw --help

If nw is not found

  • Check: command -v nw (Linux/macOS) or where nw (Windows)
  • If using pipx: ensure PATH is set, then reload shell
    pipx ensurepath
    exec $SHELL
    
  • Linux/macOS: add user bin to PATH if needed
    echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc  # or ~/.zshrc
    exec $SHELL
    
  • Windows (native, best-effort): prefer WSL2; if native, run pipx ensurepath and restart the terminal

More → PATH troubleshooting: https://narrowin.github.io/networka/troubleshooting/#path-nw-not-found

Upgrade & Remove

# Upgrade to latest version (from GitHub)
uv tool install --force git+https://github.com/narrowin/networka.git
# or
pipx install --force git+https://github.com/narrowin/networka.git

# Remove installation
uv tool uninstall nw
# or
pipx uninstall networka

Platform-Specific Notes

Linux/macOS: No additional dependencies required

Windows: Scrapli (the default transport) does not officially support native Windows. While it may work with Paramiko or ssh2-python drivers, the recommended approach is to run Networka on WSL2 (Ubuntu) for a fully supported POSIX environment. Native Windows usage is best-effort.

WSL2 quickstart (recommended):

# In Ubuntu on WSL2
curl -LsSf https://astral.sh/uv/install.sh | sh
exec $SHELL
uv tool install git+https://github.com/narrowin/networka.git
nw --help

Details → https://narrowin.github.io/networka/platform-compatibility/#wsl2-quickstart-recommended

Quick Start

Get up and running with config init command:

# Initialize in default location with interactive prompts
nw config init

One-liners (no config)

Run directly against an IP without creating files. --platform selects the network OS driver; --interactive-auth prompts for credentials.

# MikroTik RouterOS
nw run --platform mikrotik_routeros 192.0.2.10 "/system/identity/print" --interactive-auth
# Cisco IOS-XE
nw run --platform cisco_iosxe 198.51.100.20 "show version" --interactive-auth

Terminology: device_type vs hardware platform vs transport

  • device_type: Network OS driver used for connections and commands (Scrapli "platform"). Examples: mikrotik_routeros, cisco_iosxe, arista_eos, juniper_junos.
  • platform (hardware/firmware): Hardware architecture used for firmware-related operations (x86, x86_64, arm, mipsbe, tile).
  • transport: Connection backend. Default is scrapli.

Note: When targeting IPs directly, --platform refers to the network driver (device_type), not hardware architecture.

Quick links

CLI overview

Community & support

Contributing

Have a look through existing Issues and Pull Requests that you could help with. If you'd like to request a feature or report a bug, please create a GitHub Issue using one of the templates provided.

See contribution guide →

Documentation

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

Acknowledgments

  • Scrapli - Network device connections
  • Nornir - Network automation framework
  • Netmiko - Multi-vendor CLI connections to network devices
  • Typer - CLI framework
  • Pydantic - Data validation
  • Rich - Terminal formatting

Built for network engineers who value clean, reliable automation

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

networka-0.1.9.tar.gz (550.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

networka-0.1.9-py3-none-any.whl (203.7 kB view details)

Uploaded Python 3

File details

Details for the file networka-0.1.9.tar.gz.

File metadata

  • Download URL: networka-0.1.9.tar.gz
  • Upload date:
  • Size: 550.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for networka-0.1.9.tar.gz
Algorithm Hash digest
SHA256 d51b9fc69638c2d3ba19ec64e706075cba2a8bce182845ba96a273f11439fbcf
MD5 e47e85e1256aa8eaf6827f00a6173f05
BLAKE2b-256 60a7dfa30cf113cfd3cc8287e8209a4465b19eb11d0a0f7d5fb420b7b35375fc

See more details on using hashes here.

File details

Details for the file networka-0.1.9-py3-none-any.whl.

File metadata

  • Download URL: networka-0.1.9-py3-none-any.whl
  • Upload date:
  • Size: 203.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.8

File hashes

Hashes for networka-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 f6eaf5a4697adddc12c6faf2bd985ae10820b6bac06ba67054d02b948a4b5c73
MD5 07c273f562aaa3c9ab4b8f7cc9d1fdbc
BLAKE2b-256 6fb0a0c2c3fb9be73b1c14f584d93c4f88d5e6b466acac27c74cbf21c337c4bf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page