napalm-automation/napalm: one Python API for routers from different vendors
Network Automation and Programmability Abstraction Layer with Multivendor support
At a glance
- What is it?
- NAPALM is a Python library that hides vendor differences behind a single set of functions for reading facts, pulling configuration and pushing changes. It is aimed at network engineers who write automation code, and its real cost is the dependency list and the per-OS caveats.
- Who is it for?
- Adopt NAPALM when your fleet mixes vendors and you want one Python surface for facts, configuration and validation instead of a separate driver per platform. Do not adopt it if you only run one OS and are happy with that vendor's own library, or if your devices are not on the support matrix.
- Can I use it commercially?
- Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
- Is it still maintained?
- Yes. The repository received new commits within the last day.
- What is it written in?
- Mainly Python, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 22, 2026, and from our analysis. They are not legal advice.
Star history
- napalm-automation/napalm2,530 ★ · +23
| Repository | 2026-09-29 | 2026-11-22 |
|---|---|---|
| napalm-automation/napalm | 2.5k | 2.5k |
23 Stars in the last 54 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
The problem NAPALM removes: one script per vendor
Every router vendor ships its own way to be programmed. Junos has junos-eznc, Arista has pyeapi, and the rest are reached over SSH with a terminal emulator such as netmiko. A script that gathers interface counters across a mixed fleet therefore needs a branch per platform, and each branch has its own return shape. NAPALM's stated purpose is to replace that with a unified API: the same function names and the same data structures regardless of which device answers.
The audience is network engineers who write Python, and the teams that build tooling on top of them. The README points at napalm-ansible for Ansible modules and notes that NAPALM has been integrated in SaltStack since the release code named Carbon (2016.11), with a separate integration pack for StackStorm. NAPALM is the layer underneath those, not a replacement for them. If you already drive devices through Ansible modules, you may be using NAPALM without calling it directly.
How the abstraction is put together
The repository keeps the shared surface in napalm/ and the per-vendor implementations as drivers behind it. The pyproject.toml shows what those drivers pull in: paramiko, netmiko, junos-eznc, pyeapi, ncclient, lxml and requests for transport and device access, plus textfsm, ttp, ttp_templates, jinja2, netaddr, netutils and pyyaml for parsing, templating and address handling. That dependency set is the mechanism. NAPALM is not a protocol of its own; it is a common front end that dispatches to vendor libraries and normalises what they return.
That design has a direct consequence for how you debug. When a call fails, the failure can sit in NAPALM, in the vendor library, or on the device. The README's own troubleshooting checklist reflects this: check the release is current, confirm the credentials work, confirm the device meets the minimum requirements in the support matrix, and confirm OS-specific constraints are satisfied, giving the examples of enabling the XML agent on IOS-XR or the NXAPI feature on NXOS. Those are device-side prerequisites, not library bugs.
Installing NAPALM and running a first get_facts call
The README gives a single install command. Note the Python floor: releases from 5.1.0 onward support Python 3.9 and later, 5.0.0 supported 3.8 and later, and 4.0.0 supported 3.7 and later. The pyproject.toml in the repository requires Python 3.10 or later for the development tree.
pip install napalmInstalling the package also puts four command line tools on the path, declared in pyproject.toml: napalm, cl_napalm_configure, cl_napalm_test and cl_napalm_validate. The first real check is a facts call against one reachable device. The README documents this form, where vendor, username, password and hostname are mandatory and optional arguments are given as comma separated values.
napalm --vendor junos --user napalm --password dbejmujz --optional_args 'port=12202, config_lock=False' edge01.bjm01 call get_factsThe README's own example uses junos and port 12202. Substitute your vendor and credentials. If the call returns, you have confirmed three things at once: the library is installed, the device is reachable with those credentials, and the OS-specific prerequisites for that driver are in place. If it fails, the README says to work through the checklist before reporting anything, because the error usually points at environment setup rather than at NAPALM. Upgrades use the same command with the -U flag.
pip install napalm -UThere is also a Dockerfile in the repository, built from python:3.12-slim-bookworm, which installs the package and sets napalm as the entrypoint.
The support matrix is the real boundary
NAPALM's value depends entirely on whether your devices are covered, and coverage is not uniform. The README does not list supported operating systems inline; it links to a support page on Read the Docs and, in the same breath, tells you to make sure you understand the caveats. That wording is a warning, not boilerplate. A driver existing for an OS does not mean every method behaves identically on it, and the caveats page is where the per-OS constraints live.
The practical failure mode is a script that works on the lab device and returns something different, or nothing, on a second platform. Because the abstraction normalises return values, a missing or partially implemented method may surface as an error rather than as a wrong answer, which is easier to catch, but only if you exercise the methods you depend on against every OS in your fleet before trusting them. The README's checklist also implies a second constraint: some operating systems need features enabled on the device itself, such as the XML agent on IOS-XR or NXAPI on NXOS. If you cannot change device configuration, some drivers are simply closed to you.
NAPALM is also the wrong tool when the job is not multivendor. If you run a single platform and its vendor library already fits, adding NAPALM adds a layer, a dependency tree and a second place to look when something breaks, in exchange for portability you do not need. Similarly, if your automation is already expressed in Ansible playbooks, going through napalm-ansible is a different decision from writing NAPALM calls directly.
Alternatives and where the approach differs
The closest alternative is to use the vendor libraries directly. junos-eznc and pyeapi are already NAPALM dependencies, so this is not a question of capability but of where the normalisation happens. Calling pyeapi yourself gives you the vendor's own object model and error semantics with no translation layer; NAPALM gives you one function name across platforms at the cost of that layer. For a single-vendor shop, the direct route is less machinery. For a mixed fleet, the direct route means writing and maintaining the normalisation yourself.
The other route is a configuration management framework. SaltStack has carried NAPALM integration since the Carbon release, and napalm-ansible provides Ansible modules built on the same API. Those differ from raw NAPALM in kind: they are declarative and state-driven, while NAPALM is a library you call from your own code. Choosing between them is mostly about whether your team already runs one of those frameworks. If it does, NAPALM is likely present already and the interesting question is which modules you are using.
Maintenance, licence and upgrade cost
The last push to the repository was on 2026-08-12, and the most recent release listed is 5.2.0 from 2026-07-27. The project is not archived. The README states that releases are frequent and that upgrading to the latest version may resolve issues on its own, and the upgrade path is the install command with the -U flag. That is cheap to run but not free to absorb: the Python floor has moved with each major release, from 3.7 to 3.8 to 3.9, and the development tree in pyproject.toml already requires 3.10. An upgrade can therefore force an interpreter upgrade on the machine running your automation.
The dependency list is long and includes device libraries that move independently of NAPALM, so pinning is worth considering if your automation runs unattended. The package is licensed Apache-2.0, and the project ships a NOTICE file alongside LICENSE, which is the usual arrangement for Apache-2.0 distributions. This is a description of what the repository contains, not legal advice; check the licence and NOTICE text against how you intend to redistribute.
Editorial conclusion
Adopt NAPALM when your fleet mixes vendors and you want one Python surface for facts, configuration and validation instead of a separate driver per platform. Do not adopt it if you only run one OS and are happy with that vendor's own library, or if your devices are not on the support matrix. Before writing code, install it, run the napalm CLI against one lab device with get_facts, and read the support matrix caveats for that OS.
Frequently asked questions
What is the purpose of napalm-automation/napalm?
It is a Python library that implements a set of functions for interacting with router devices from different vendors through a unified API, so the same calls and data structures work across platforms.
What Python version does napalm-automation/napalm need?
The README states that releases from 5.1.0 onward support Python 3.9 and later, 5.0.0 supported 3.8 and later, and 4.0.0 supported 3.7 and later. The pyproject.toml in the repository requires Python 3.10 or later for the development tree.
How do I check that napalm-automation/napalm can reach a device?
The README suggests the napalm CLI with the call get_facts subcommand, passing vendor, user, password, optional arguments and the hostname. If that returns facts, the library, the credentials and the OS-specific prerequisites are all working.
How do I upgrade napalm-automation/napalm?
The README says upgrading is the install command repeated with the -U flag, so pip install napalm -U. It also notes that releases are frequent and that being on the latest version may resolve an issue on its own.
Which network operating systems does napalm-automation/napalm support?
The README does not list them inline. It links to a support page on Read the Docs and asks you to understand the caveats there, which cover per-OS constraints such as enabling the XML agent on IOS-XR or the NXAPI feature on NXOS.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/napalm-automation-napalm)Star history chart for your README
[](https://hysenlabs.com/projects/napalm-automation-napalm)Was this useful?