Skip to main content

pyYAHTS

An interpretation of pyATS

pyYAHTS is a dyanmic, on-demand, YAML-free / testbed.yaml free, implementation of pyATS.

It works with any IOS / IOS-XE / IOS-XR / NXOS device!

The results are Rich JSON printed to the screen

Requirements

pyYAHTS is an extension of pyATS, which is required, and only runs on Linux operating systems

Installation

  1. pip install pyYAHTS

Getting Started

pyYAHTS works on any Cisco OS IOS / IOS-XE / IOS-XR / NXOS

pyYAHTS requires the follow options be speficied at runtime:

  1. (Required) Hostname of the device - must exactly match the configured hostname

  2. (Required) Operating System - Either ios, iosxe, iosxr, or nxos

  3. (Required) Username

  4. (Required) Password

  5. (Required) Command - Either a pyATS Learn Function, such as ospf, or any supported pyATS Parsed CLI Show Command, such as "show ip interface brief"

  6. (Optional) Filetype - Creates an output file -

    Supported filetpyes: JSON, YAML, HTML, Datatable HTML, Markdown, PDF, CSV

  7. (Optional) Email - 3 required fields if you want to e-mail the output with GMail

    --from_email - Your GMail Address

    --email_password - Your Gmail Password

    --to_email - The recipients Email

Help

For a list of supported Learn Functions please visit Available Learn Functions

Available Learn Functions

For a list of supported Parsers please visit Available Show Command Parsers

Available Show Parsers

A sample of "Show IP Interface" Parsers for IOS-XE IOS-XE Show IP Interface Sample

Using pyYAHTS

In any virtual environment with pyATS installed pyYAHTS can be executed several ways

  1. Prompted Inputs
(virtualenv)$ pyYAHTS
Hostname: dist-sw01
OS (ios, iosxe, iosxr, nxos): nxos
Username: cisco
Password:
Command: ospf
  1. Directly supplying options
(virtualenv)$ pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf
  1. Mixing supplied options and prompted responses
(virtualenv)$ pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco
Command: ospf

Creating Output files

If you include the optional --filetype flag you can create JSON and YAML files from the data

pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype json
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype yaml
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype html
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype datatable
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype markdown
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype pdf
pyYAHTS --hostname dist-sw01 --os nxos --username cisco --password cisco --command ospf --filetype csv

E-Mail Network State

If you include the optional E-Mail flags you can send the network state data using GMail

You will have to enable IMAP permissions on your GMail Account Enable IMAP in GMail

You may also have to enable support for Less Secure Apps

The three required flags to send an email are:

--from_email - Your GMail Address

--email_password - Your Gmail Password

--to_email - The recipients Email

Additonally if you specify a filetype (--filetype) the output file will be automatically attached to the email

Help

pyYAHTS includes a handy Rich Click Help! Simple type:

$ pyYAHTS --help

More Help

Contact

Please reach out on Twitter Twitter or open an issue if you hit any snags or have any questions!

Metadata

Release files for pyyahts 1.0.50

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

Source distribution (sdist)

Source distribution for pyyahts 1.0.50
File Size Uploaded Provenance Actions
pyYAHTS-1.0.50.tar.gz 195.1 kB Without provenance Details for pyYAHTS-1.0.50.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyyahts 1.0.50
File Interpreter ABI Platform Actions
pyYAHTS-1.0.50-py3-none-any.whl Python 3 none any Details for pyYAHTS-1.0.50-py3-none-any.whl

Total release size: 400.5 kB

Release files / pyYAHTS-1.0.50.tar.gz

Download URL pyYAHTS-1.0.50.tar.gz
Size 195.1 kB
Tags Source
SHA-256 checksum
How to use checksums
57343050a532d28e4dfd604e901e555cb2fd67936d1dd18fe2fc4f34e3f7cb2b
BLAKE2b-256 checksum
How to use checksums
8da1ac405350d893b06ab550f7004ed38d34fd8423c9973187f7cb00dc9dd30d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.3 Linux/5.4.72-microsoft-standard-WSL2

Release files / pyYAHTS-1.0.50-py3-none-any.whl

Download URL pyYAHTS-1.0.50-py3-none-any.whl
Size 205.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
dec6aed51626305e9db35519e67dee3820ed2f0f32bd539816efe6447e40bb91
BLAKE2b-256 checksum
How to use checksums
62a16f35faca03bd5bbf28efcaa72b1589eaf91563ae65e5e7c5519bd20a073c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.13 CPython/3.10.3 Linux/5.4.72-microsoft-standard-WSL2

Security for pyyahts 1.0.50

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.0.50 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