diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 09:24:45 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-14 09:24:45 +0000 |
commit | b88b57aff93c95ae07f8a2f05a6a577b39cb1f1f (patch) | |
tree | a8c2cbdeefe4aba4936c128ebfd4cb600da23dc1 /README.md | |
parent | Initial commit. (diff) | |
download | aio-eapi-upstream/0.6.3.tar.xz aio-eapi-upstream/0.6.3.zip |
Adding upstream version 0.6.3.upstream/0.6.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'README.md')
-rw-r--r-- | README.md | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/README.md b/README.md new file mode 100644 index 0000000..622aeff --- /dev/null +++ b/README.md @@ -0,0 +1,43 @@ +# Arista EOS API asyncio Client + +This repository contains an Arista EOS asyncio client. + +### Quick Example + +Thie following shows how to create a Device instance and run a list of +commands. + +Device will use HTTPS transport by default. The Device instance supports the +following initialization parameters: + + * `host` - The device hostname or IP address + * `username` - The login username + * `password` - The login password + * `proto` - *(Optional)* Choose either "https" or "http", defaults to "https" + * `port` - *(Optional)* Chose the protocol port to override proto default + +The Device class inherits directly from httpx.AsyncClient. As such, the Caller +can provide any initialization parameters. The above specific parameters are +all optional. + +```python +import json +from aioeapi import Device + +username = 'dummy-user' +password = 'dummy-password' + +async def run_test(host): + dev = Device(host=host, username=username, password=password) + res = await dev.cli(commands=['show hostname', 'show version']) + json.dumps(res) +``` + +### References + +Arista eAPI documents require an Arista Portal customer login. Once logged into the +system you can find the documents in the Software Download area. Select an EOS release +and then select the Docs folder. + +You can also take a look at the Arista community client, [here](https://github.com/arista-eosplus/pyeapi). + |