<commit_before># Arista eAPI Python Library

[![Build
Status](https://travis-ci.org/arista-eosplus/pyeapi.svg?branch=develop)](https://travis-ci.org/arista-eosplus/pyeapi) [![Coverage
Status](https://coveralls.io/repos/arista-eosplus/pyeapi/badge.svg?branch=develop)](https://coveralls.io/r/arista-eosplus/pyeapi?branch=develop)

The Python library for Arista's eAPI command API implementation provides a
client API work using eAPI and communicating with EOS nodes.  The Python
library can be used to communicate with EOS either locally (on-box) or remotely
(off-box).  It uses a standard INI-style configuration file to specify one or
more nodes and connection properites.

The pyeapi library also provides an API layer for building native Python
objects to interact with the destination nodes.  The API layer is a convienent
implementation for working with the EOS configuration and is extensible for
developing custom implemenations.

This library is freely provided to the open source community for building
robust applications using Arista EOS.  Support is provided as best effort
through Github issues.

## Requirements

* Arista EOS 4.12 or later
* Arista eAPI enabled for at least one transport (see Official EOS Config Guide
  at arista.com for details)
* Python 2.7

# Getting Started
In order to use pyeapi, the EOS command API must be enabled using ``management
api http-commands`` configuration mode.  This library supports eAPI calls over
both HTTP and UNIX Domain Sockets.  Once the command API is enabled on the
destination node, create a configuration file with the node properities. 

**Note:** The default search path for the conf file is ``~/.eapi.conf``
followed by ``/mnt/flash/eapi.conf``.  This can be overridden by setting
``EAPI_CONF=<path file conf file>`` in your environment.

## Example eapi.conf File
Below is an example of an eAPI conf file.  The conf file can contain more than
one node.  Each node section must be prefaced by **connection:\<name\>** where
\<name\> is the name of the connection.<commit_msg>Updating the README.md to indicate that support for Python 3 is work in progress.<commit_after># Arista eAPI Python Library

[![Build
Status](https://travis-ci.org/arista-eosplus/pyeapi.svg?branch=develop)](https://travis-ci.org/arista-eosplus/pyeapi) [![Coverage
Status](https://coveralls.io/repos/arista-eosplus/pyeapi/badge.svg?branch=develop)](https://coveralls.io/r/arista-eosplus/pyeapi?branch=develop)

The Python library for Arista's eAPI command API implementation provides a
client API work using eAPI and communicating with EOS nodes.  The Python
library can be used to communicate with EOS either locally (on-box) or remotely
(off-box).  It uses a standard INI-style configuration file to specify one or
more nodes and connection properites.

The pyeapi library also provides an API layer for building native Python
objects to interact with the destination nodes.  The API layer is a convienent
implementation for working with the EOS configuration and is extensible for
developing custom implemenations.

This library is freely provided to the open source community for building
robust applications using Arista EOS.  Support is provided as best effort
through Github issues.

## Requirements

* Arista EOS 4.12 or later
* Arista eAPI enabled for at least one transport (see Official EOS Config Guide
  at arista.com for details)
* Python 2.7 / 3.4+ (Python 3 support is work in progress)

# Getting Started
In order to use pyeapi, the EOS command API must be enabled using ``management
api http-commands`` configuration mode.  This library supports eAPI calls over
both HTTP and UNIX Domain Sockets.  Once the command API is enabled on the
destination node, create a configuration file with the node properities. 

**Note:** The default search path for the conf file is ``~/.eapi.conf``
followed by ``/mnt/flash/eapi.conf``.  This can be overridden by setting
``EAPI_CONF=<path file conf file>`` in your environment.

## Example eapi.conf File
Below is an example of an eAPI conf file.  The conf file can contain more than
one node.  Each node section must be prefaced by **connection:\<name\>** where
\<name\> is the name of the connection.
{'fraction_non_alphanumeric': 0.07221163012392755, 'fraction_numerical': 0.003336510962821735, 'mean_word_length': 4.663967611336032, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4834427', 'n_tokens_mistral': 1189, 'n_tokens_neox': 1136, 'n_words': 552}