Skip to main content

PyPI Supported python versions

Requirements

napalm-ros 1.6.0 and newer require NAPALM 5.x. NAPALM 5 added a format argument to get_config, and a driver cannot match both the NAPALM 4 and NAPALM 5 method signatures at once, so NAPALM 4 is no longer supported. Stay on napalm-ros 1.5.0 if you need NAPALM 4.

Caveats

As napalm-ros uses API, several caveats exist.

  • API is not versioned so things may break when routeros is upgraded.
  • RouterOS has no native, non-reboot commit/rollback and safe mode is not exposed via the API. Rollback is emulated with a device-side scheduler that restores a backup, so a rollback (or an expired commit-confirm) reverts by rebooting. See Configuration management.
  • get_config reads the running configuration over the binary API on RouterOS 7.13+ (no SSH). Below 7.13 -- RouterOS 6 and RouterOS 7.0-7.12 -- it falls back to SSH (paramiko), because reading a large export back over the API needs the chunked /file/read added in 7.13. On that SSH path, paramiko offers keys from a running SSH agent by default; if the agent offers a key the device rejects, RouterOS may drop the session and get_config then fails with No existing session. Pass optional_args={'paramiko_allow_agent': False} to authenticate with the password only (SSH agent/key auth is otherwise left enabled); paramiko_look_for_keys (default False) similarly controls on-disk key lookup.
  • get_config accepts NAPALM 5's format argument but only supports text, because RouterOS exports its configuration as an /export script and offers no other representation. Any other value raises NotImplementedError.

Configuration management

Configuration management targets RouterOS 7.x and requires librouteros >= 4.2.2, which carries the /file/add fix commit_config relies on to apply a candidate on RouterOS older than ~7.13.

The commit/rollback machinery -- load_merge_candidate / load_replace_candidate, commit_config, confirm_commit, has_pending_commit, rollback, discard_config -- runs entirely over the binary API (no SSH). get_config and compare_config read the running configuration the version-aware way noted above: binary API on RouterOS 7.13+, SSH (paramiko) fallback below 7.13.

  • get_config / compare_config read the running configuration with /export.
  • load_merge_candidate stages a .rsc script that is applied with /import. load_replace_candidate stages a full configuration.
  • commit_config applies the candidate. On RouterOS 7.16+ it first dry-runs the candidate (/import dry-run) so a syntax error is caught before anything is applied; below 7.16 that pre-flight is skipped (pass optional_args={'validate_before_commit': False} to disable it). Before a plain commit a backup is taken so rollback can restore it (by rebooting). commit_config(revert_in=<seconds>) arms a device-side scheduler that restores that backup unless confirm_commit is called in time (has_pending_commit reports whether one is armed). Because the timer lives on the device it survives a lost session or a lock-out.
  • A replace (load_replace_candidate + commit_config) uses /system reset-configuration run-after-reset, which wipes the configuration and reboots into the candidate. It is destructive, has no automatic rollback, and the candidate must be a complete, self-consistent configuration that restores management connectivity. Commit-confirm (revert_in) is not available with a replace.

RouterOS configuration is imperative (an /export is a list of add/set actions, not declarative state) and ordering matters in some paths (e.g. /ip firewall filter) but not others (e.g. /ip address). compare_config is therefore a textual diff for review, not an executable patch.

cli

cli(commands) runs each command as a one-line script with /execute over the binary API (no SSH) and returns what it printed, keyed by command. Commands are RouterOS script syntax, not interactive-terminal shorthand (abbreviated menu names, tab completion): /ip/address/print or :put [/system/identity/get name] on RouterOS 7, /ip address print on RouterOS 6 (which does not accept the slash-separated form). A command RouterOS cannot parse comes back as output text (syntax error (line 1 column 6)), the way an IOS % Invalid input would, not as an exception. Only the text encoding is supported.

  • On RouterOS 7 (verified on 7.18.2 and 7.23.5) /execute as-string blocks and returns the output directly. RouterOS caps an executed script at 64 KB.
  • RouterOS 6 rejects as-string (verified on 6.33.3, 6.44.5, 6.49.21), so there the script runs as a background job writing to a temporary file (napalm-cli-<id>.txt), which is read back and removed. The API only exposes a file's contents inline when it is under about 4 KB and RouterOS 6 has no /file/read, so larger output raises CommandErrorException; use SSH for that. Support is detected on the first cli() call of a session, not from the version number.

Line endings are normalised to \n.

Implemented getters

  • get_arp_table
  • get_interfaces_counters
  • get_environment
  • get_facts
  • get_interfaces
  • get_interfaces_ip
  • get_ntp_servers
  • get_snmp_information
  • get_users
  • get_ipv6_neighbors_table
  • is_alive
  • ping
  • get_lldp_neighbors
  • get_lldp_neighbors_detail
  • get_network_instances
  • get_mac_address_table
  • get_bgp_neighbors
  • get_bgp_neighbors_detail
  • get_config
  • get_vlans
  • cli

Metadata

Release files for napalm-ros 1.6.1

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

Source distribution (sdist)

Source distribution for napalm-ros 1.6.1
File Size Uploaded Provenance Actions
napalm_ros-1.6.1.tar.gz 17.4 kB Without provenance Details for napalm_ros-1.6.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for napalm-ros 1.6.1
File Interpreter ABI Platform Actions
napalm_ros-1.6.1-py3-none-any.whl Python 3 none any Details for napalm_ros-1.6.1-py3-none-any.whl

Total release size: 35.5 kB

Release files / napalm_ros-1.6.1.tar.gz

Download URL napalm_ros-1.6.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
5dfdd2234db0aa1691eb07bb07da05ebcaf7f5997d3eba6f0f0cbdf361e1a0da
BLAKE2b-256 checksum
How to use checksums
30f0640eef07da06e66b9ac4a1fe0d8e7474cbf88dafbdb1c3b63110fec99079
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / napalm_ros-1.6.1-py3-none-any.whl

Download URL napalm_ros-1.6.1-py3-none-any.whl
Size 18.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
01ee47501544782463cb19c4caa93ca42bdd7f3d5112a6c93f55c07fc1948a68
BLAKE2b-256 checksum
How to use checksums
cf6994023e9541b4b2fad5a9ef64f0e7949de0eec4e4a597e50d3b71539d255b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.5 {"installer":{"name":"uv","version":"0.13.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"26.04","id":"resolute","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for napalm-ros 1.6.1

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.

Release history Release notifications | RSS feed

This release

1.6.1 This release

2 release files No provenance

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