Python asyncio client for IP Fabric
Project description
Python Asyncio Client for IP Fabric
This package contains a Python 3.8 asyncio client for use wih the IP Fabric product.
- About IP Fabric: https://ipfabric.io/
- About IP Fabric API: https://docs.ipfabric.io/api/
Installation
PyPi installation
pip install aio-ipfabric
Direct installation
pip install git+https://github.com/jeremyschulman/aio-ipfabric@master#egg=aio-ipfabric
Quick Start
import asyncio
from aioipfabric import IPFabricClient
loop = asyncio.get_event_loop()
# create a client using environment variables (see next section)
ipf = IPFabricClient()
# login to IP Fabric system
loop.run_until_complete(ipf.login())
# fetch the complete device inventory
device_list = loop.run_until_complete(ipf.fetch_devices())
Environment Variables
The following environment variable can be used so that you do no need to provide them in your program:
IPF_ADDR
- IP Fabric server URL, for example "https://my-ipfabric-server.com/"IPF_USERNAME
- Login usernameIPF_PASSWORD
- Login passwordIPF_TOKEN
- A refresh token that can be used to obtain an access token
You can use either the login credentials or the refresh token to login.
If you prefer not to use environment variables, the call to IPFabricClient()
accepts
parameters; refer to the help(IPFabricClient)
for details.
Documentation
See the docs directory.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
aio-ipfabric-0.6.1.tar.gz
(15.0 kB
view details)
Built Distribution
File details
Details for the file aio-ipfabric-0.6.1.tar.gz
.
File metadata
- Download URL: aio-ipfabric-0.6.1.tar.gz
- Upload date:
- Size: 15.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d4d880f35cbc24d2dd4d3601dc744bbafe3dd0685a98c4d69d419d03a9244cf3 |
|
MD5 | 813bef9358b9fc43da77e054c40e373d |
|
BLAKE2b-256 | e3b6ac435cf5829765ae16899ff457578d7b3d79b56687c91bc8d998410cec6a |
File details
Details for the file aio_ipfabric-0.6.1-py3-none-any.whl
.
File metadata
- Download URL: aio_ipfabric-0.6.1-py3-none-any.whl
- Upload date:
- Size: 30.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a2daf616daf95eabc5dfe6b57486623de0edcd87a130abe59ab46d6120f50ef7 |
|
MD5 | 8362b6c89a7cb47cc223518221dba488 |
|
BLAKE2b-256 | c55aa3fa4c594e906acda00c2cc4b7410d26d7d12eaacdf6d80ff71948333937 |