Skip to main content

Python package for interacting with IP Fabric

Project description

IPFabric

IPFabric is a Python module for connecting to and communicating against an IP Fabric instance.

Requirements Status

About

Founded in 2015, IP Fabric develops network infrastructure visibility and analytics solution to help enterprise network and security teams with network assurance and automation across multi-domain heterogeneous environments. From in-depth discovery, through graph visualization, to packet walks and complete network history, IP Fabric enables to confidently replace manual tasks necessary to handle growing network complexity driven by relentless digital transformation.

Versioning

Starting with IP Fabric version 5.0.x the python-ipfabric and python-ipfabric-diagrams will need to match your IP Fabric version. The API's are changing and instead of api/v1 they will now be api/v5.0.

Version 5.1 will have backwards compatability with version 5.0 however 6.0 will not support any 5.x versions. By ensuring that your ipfabric SDK's match your IP Fabric Major Version will ensure compatibility and will continue to work.

Installation

pip install ipfabric

To run examples please specify the extras option during install:

pip install ipfabric -E examples

Introduction

Please take a look at API Programmability - Part 1: The Basics for instructions on creating an API token.

Most of the methods and features can be located in Examples to show how to use this package. Another great introduction to this package can be found at API Programmability - Part 2: Python

Diagrams

Diagramming in IP Fabric version v4.3 and above has been moved to it's own package.

pip install ipfabric-diagrams

Authentication

Username/Password

Supply in client:

from ipfabric import IPFClient
ipf = IPFClient('https://demo3.ipfabric.io/', username='user', password='pass')

Token

from ipfabric import IPFClient
ipf = IPFClient('https://demo3.ipfabric.io/', token='token')

Environment

The easiest way to use this package is with a .env file. You can copy the sample and edit it with your environment variables.

cp sample.env .env

This contains the following variables which can also be set as environment variables instead of a .env file.

IPF_URL="https://demo3.ipfabric.io"
IPF_TOKEN=TOKEN
IPF_VERIFY=true

Or if using Username/Password:

IPF_URL="https://demo3.ipfabric.io"
IPF_USERNAME=USER
IPF_PASSWORD=PASS

IPF_DEV is an internal variable only, do not set to True.

Development

IPFabric uses poetry for the python packaging module. Install poetry globally:

pip install poetry

To install a virtual environment run the following command in the root of this directory.

poetry install

To test and build:

poetry run pytest
poetry build

Prior to pushing changes run:

poetry run black ipfabric
poetry update
poetry export -f requirements.txt -o requirements.txt --without-hashes
git add requirements.txt

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

ipfabric-5.0.3.tar.gz (48.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ipfabric-5.0.3-py3-none-any.whl (62.1 kB view details)

Uploaded Python 3

File details

Details for the file ipfabric-5.0.3.tar.gz.

File metadata

  • Download URL: ipfabric-5.0.3.tar.gz
  • Upload date:
  • Size: 48.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ipfabric-5.0.3.tar.gz
Algorithm Hash digest
SHA256 41b021921d17ce02c2e1fab5c7bea2fd1a1cb463f46678076bab30f0faaefb1a
MD5 20f2c0ffc6adf47f472615fbad56171c
BLAKE2b-256 23ef00fce886decf7422d13710f30f443640d9084afb8c84d4da924b1b13a94f

See more details on using hashes here.

File details

Details for the file ipfabric-5.0.3-py3-none-any.whl.

File metadata

  • Download URL: ipfabric-5.0.3-py3-none-any.whl
  • Upload date:
  • Size: 62.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for ipfabric-5.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 cc9c6f786c38c2549f95d4ebc5c8a15d034c69cdf5b4bdec95c5650bd0267302
MD5 df63227a15cb51a764069875398a02ca
BLAKE2b-256 232593f35789f10ce3d63be2e3609a71dc04492782b89a52cb5754862c156613

See more details on using hashes here.

Supported by

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