Skip to main content

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:

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


Download files

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

Source Distribution

netapult-0.0.2.tar.gz (10.6 kB view details)

Uploaded Source

Built Distribution

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

netapult-0.0.2-py3-none-any.whl (10.0 kB view details)

Uploaded Python 3

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

Hashes for netapult-0.0.2.tar.gz
Algorithm Hash digest
SHA256 ed55c23a8dbf328c91fd8a2fbb46b054c711385260c46fb407f4aa21a6f1e041
MD5 8b231cb5c4b004474f608565a060e42c
BLAKE2b-256 0be4c02f2323883f66360af884b3ae28adc93334245809c317918f8738cd9aaa

See more details on using hashes here.

Provenance

The following attestation bundles were made for netapult-0.0.2.tar.gz:

Publisher: python-publish.yml on Jayson-Fong/netapult

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for netapult-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 16aa6a81a58265296e11b99b263bf3ae1de288560acaa9ee8d451725c478845a
MD5 c3172fe70a117f2a331bb8111b2e0cb4
BLAKE2b-256 090dbb8e9929ddbbf0d9550519b08851929eb047690db47f0ae77b3bb7f2e6e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for netapult-0.0.2-py3-none-any.whl:

Publisher: python-publish.yml on Jayson-Fong/netapult

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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