Skip to main content

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.

Downloads Supported Python Version Contributors License

Installating aio-ipfabric and supported versions

aio-ipfabric is available on PyPI:

pip install aio-ipfabric

Direct installation

pip install git+https://github.com/jeremyschulman/aio-ipfabric@master#egg=aio-ipfabric

Requests officially supports Python 3.8+.

Quick Start

import asyncio
from aioipfabric import IPFabricClient

loop = asyncio.get_event_loop()

# create a client using environment variables (see next section)
ipf = IPFabricClient()

# alternatively create instance with parameters
# ipf = IPFabricClient(base_url='https://myipfserver.com', username='admin', password='admin12345')
# ipf = IPFabricClient(base_url='https://myipfserver.com', token='TOKENFROMIPF')

# 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())

# close asyncio connection, otherwise you will see a warning.
loop.run_until_complete(ipf.logout())

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 username
  • IPF_PASSWORD - Login password
  • IPF_TOKEN - A persistent API token

You can use either the login credentials or the 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


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.12.0.tar.gz (22.0 kB view details)

Uploaded Source

Built Distribution

aio_ipfabric-0.12.0-py3-none-any.whl (29.5 kB view details)

Uploaded Python 3

File details

Details for the file aio-ipfabric-0.12.0.tar.gz.

File metadata

  • Download URL: aio-ipfabric-0.12.0.tar.gz
  • Upload date:
  • Size: 22.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for aio-ipfabric-0.12.0.tar.gz
Algorithm Hash digest
SHA256 18f923e076766212bf95a0d7e59102532342937b08f9deca8d67ffbc42380814
MD5 dfe9725a90ca4bbe5c531ca5656dae72
BLAKE2b-256 ce13bd771b6879f9e785bbbd448f21d90a3020588bbfbdeaeee4be25788d1473

See more details on using hashes here.

File details

Details for the file aio_ipfabric-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: aio_ipfabric-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 29.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.8.10

File hashes

Hashes for aio_ipfabric-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 85f46f89549e49171c270e003203406172e29c3723da7bc9b77186db4fb4356d
MD5 49d3fa5aaeda6ba277a4039a92afa404
BLAKE2b-256 b553eb2ce45c033f61417728bc90fc5062ed56859f4dcdd2b9252d3082e3e913

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page