Git Product home page Git Product logo

exscript's Introduction

Exscript

Build Status Coverage Status Code Climate Documentation Status

Summary

Exscript is a Python module and a template processor for automating network connections over protocols such as Telnet or SSH. We attempt to create the best possible set of tools for working with Telnet and SSH.

Exscript also provides a set of tools and functions for sysadmins, that simplify regular expression matching, reporting by email, logging, or syslog handling, CSV parsing, ip address handling, template processing, and many more.

Exscript may be used to automate sessions with routers from Cisco, Juniper, OneAccess, Huawei, or any others. If you want to configures machines running Linux/Unix, IOS, IOS-XR, JunOS, VRP, or any other operating system that can be used with a terminal, Exscript is what you are looking for.

Do you need commercial support?

Exscript is supported by Procedure 8. Get in touch if you need anything!

Method 1: Using Exscript with Python

Simple

from Exscript.protocols import SSH2
from Exscript.util.interact import read_login

conn = SSH2()
conn.connect('localhost')
conn.login(read_login())
conn.execute('uname -a')

Slightly more advanced (multi threaded)

from Exscript.util.start import start
from Exscript.util.file import get_hosts_from_file
from Exscript.util.file import get_accounts_from_file

def do_something(job, host, conn):
    conn.execute('uname -a')

accounts = get_accounts_from_file('accounts.cfg')
hosts = get_hosts_from_file('myhosts.txt')
start(accounts, hosts, do_something, max_threads=2)

Method 2: Using the Exscript command line tool

Create a file named test.exscript with the following content:

uname -a

To run this Exscript template, just start Exscript using the following command:

exscript test.exscript ssh://localhost

Awesome fact: Just replace ssh:// by telnet:// and it should still work with Telnet devices.

Documentation

Full documentation is here:

http://exscript.readthedocs.io

exscript's People

Contributors

aureliego avatar cgill27 avatar daanvdsanden avatar egroeper avatar flaurencin avatar job avatar knipknap avatar magahet avatar martinpakosch avatar maximumg avatar mpenning avatar mwallraf avatar pheller avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.