Skip to main content

Netpalm-Client

Simple client library for working with Netpalm

Detailed example available in examples folder of this repo

Install

pip install netpalm-client

Basic Usage

from netpalm_client import NetpalmClient

netpalm = NetpalmClient(
    url='https://netpalm.example.org',
    key='someApiKey',
    cli_user='cisco',
    cli_pass='cisco'
)

task_id = netpalm.netmiko_getconfig(
    command='show run | i bgp router-id',
    host='192.168.0.1'
)['task_id']

netpalm_result = netpalm.poll_task(task_id)  # blocks until polling returns either completion or failure

actual_result = netpalm_result['task_result'][command]  # failures will have a 'task_errors' key, but not a 'task_result' key.

print(f'{actual_result=}')

Changelog

1.0.0 - 1.0.3: Initial submissions

1.0.4: Fix #3: Don't use Walrus operator in code targeting python version 3.7.

Release files for netpalm-client 1.0.4

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

Source distribution (sdist)

Source distribution for netpalm-client 1.0.4
File Size Uploaded
netpalm-client-1.0.4.tar.gz 5.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for netpalm-client 1.0.4
File Interpreter ABI Platform
netpalm_client-1.0.4-py3-none-any.whl Python 3 none any Details

Total release size: 10.7 kB

Release files / netpalm-client-1.0.4.tar.gz

Download URL netpalm-client-1.0.4.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
2a595bd89f9b21a4cd22f5901c32ff77b38b9b39cf51b505049355ef244d8bcf
BLAKE2b-256 checksum
How to use checksums
f803d8b49b15140af43563538459112f717508aabb48699b5bcfb6df626cc538
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6rc1 Windows/10

Release files / netpalm_client-1.0.4-py3-none-any.whl

Download URL netpalm_client-1.0.4-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2e57d02a0225279b596bc7d69a71be1bbd56e4147de6b109fcf2d58d82de4beb
BLAKE2b-256 checksum
How to use checksums
3c4cb875c9b86c34c6deaee923f8fde83988151150892e0b6a57c337053a6b9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.4 CPython/3.8.6rc1 Windows/10

Release history Release notifications | RSS feed

This release

1.0.4 This release

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.1.1

2 release files

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