Framework for terminal-based device management
Project description
🏹 Netapult
Purpose
Netapult is a framework for querying and managing terminal-based devices without requiring software installation on targets, designed for network and security engineers to automate workflows involving the configuration or auditing of devices.
The framework is designed to execute human-readable commands for deployments where commands may rapidly change or where a machine-to-machine protocol is not available. Through offering a plugin approach to protocols and device-specific implementations, Netapult offers the ability for developers to easily integrate their own features without waiting for a vendor.
Use Cases
🤖 Network Automation and Orchestration
Automate repetitive tasks such as configuration management, asset inventorying, and compliance checking.
🛡️ Device Auditing and Hardening
Acquire device information at scale to enable environment-aware risk management.
📚 Training
Rapidly configure a lab environment for trainees or validate their configuration.
Netapult is ideal for situations where a dedicated machine-to-machine protocol is not available as it provides an interface to execute raw commands, automating the workflow a human would undergo.
For systems where a machine-to-machine protocol is available (such as NETCONF or the Simple Network Management Protocol) combined with a use case that does not require quick command modification, you may find the following alternatives more suitable:
- ncclient: NETCONF client
- JunOS PyEZ: JunOS-specific wrapper
- pyGNMI: gRPC Network Management Interface client
- requests: HTTP client for RESTCONF
Vendors may also offer products specific to their product suite.
When these protocols or services are not available, such as during initial configuration, Netapult may aid setup and automate tasks that would otherwise mandate human intervention.
Usage
As the framework does not provide any protocol or device-specific implementation, additional packages are required to efficiently use netapult. For example, to integrate an SSH capabilities, netapult-ssh is available and offered as an extra dependency.
The following example leverages netapult-ssh to execute a command and retrieve its response:
import time
import netapult
with netapult.dispatch(
"generic", # Use the generic client
"ssh", # Use our SSH protocol
protocol_options={
"host": "your-host-here",
"username": "your-username-here",
"password": "your-password-here",
},
) as client:
# Allow time for the terminal to initialize
time.sleep(3)
# Acquire the banner
banner: str = client.read(text=True)
prompt_found, result = client.run_command("echo Hello World\n", text=True)
print("Banner:", banner)
print("Result:", result)
Across protocols, command execution generally remains in a consistent format. However, protocols may require different options to establish a connection such as when authentication or a remote connection is required. Additionally, device-specific implementations may offer an enhanced API, such as for switching in and out of modes (ex. privileged and configuration mode).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file netapult-0.0.2.tar.gz.
File metadata
- Download URL: netapult-0.0.2.tar.gz
- Upload date:
- Size: 10.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ed55c23a8dbf328c91fd8a2fbb46b054c711385260c46fb407f4aa21a6f1e041
|
|
| MD5 |
8b231cb5c4b004474f608565a060e42c
|
|
| BLAKE2b-256 |
0be4c02f2323883f66360af884b3ae28adc93334245809c317918f8738cd9aaa
|
Provenance
The following attestation bundles were made for netapult-0.0.2.tar.gz:
Publisher:
python-publish.yml on Jayson-Fong/netapult
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netapult-0.0.2.tar.gz -
Subject digest:
ed55c23a8dbf328c91fd8a2fbb46b054c711385260c46fb407f4aa21a6f1e041 - Sigstore transparency entry: 584351162
- Sigstore integration time:
-
Permalink:
Jayson-Fong/netapult@40ae79356e4470ceca990191a9797d9892305d51 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/Jayson-Fong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40ae79356e4470ceca990191a9797d9892305d51 -
Trigger Event:
release
-
Statement type:
File details
Details for the file netapult-0.0.2-py3-none-any.whl.
File metadata
- Download URL: netapult-0.0.2-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
16aa6a81a58265296e11b99b263bf3ae1de288560acaa9ee8d451725c478845a
|
|
| MD5 |
c3172fe70a117f2a331bb8111b2e0cb4
|
|
| BLAKE2b-256 |
090dbb8e9929ddbbf0d9550519b08851929eb047690db47f0ae77b3bb7f2e6e5
|
Provenance
The following attestation bundles were made for netapult-0.0.2-py3-none-any.whl:
Publisher:
python-publish.yml on Jayson-Fong/netapult
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
netapult-0.0.2-py3-none-any.whl -
Subject digest:
16aa6a81a58265296e11b99b263bf3ae1de288560acaa9ee8d451725c478845a - Sigstore transparency entry: 584351163
- Sigstore integration time:
-
Permalink:
Jayson-Fong/netapult@40ae79356e4470ceca990191a9797d9892305d51 -
Branch / Tag:
refs/tags/0.0.2 - Owner: https://github.com/Jayson-Fong
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@40ae79356e4470ceca990191a9797d9892305d51 -
Trigger Event:
release
-
Statement type: