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.

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. The diagramming included in this package will work for version >= v4.0 and < v4.3.

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

Uploaded Source

Built Distribution

ipfabric-4.4.3-py3-none-any.whl (26.0 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ipfabric-4.4.3.tar.gz
Algorithm Hash digest
SHA256 a2389aca4e0440d09ff85070d8a8b897cffde2c1667d42a4f9a0edb8d248804d
MD5 c292224a2816629b48b8fb919282e740
BLAKE2b-256 9048161e3dbda8ae93ed806c4194de6892e2918cb88b2ccc0329c3559c1405e6

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ipfabric-4.4.3-py3-none-any.whl
Algorithm Hash digest
SHA256 bc49d6cc1d6206ee6f6d70d73dd4235cc1a816cc1e6a8d200704e0540bdc2eb6
MD5 36d2fadbd29a0419c06b8cd55534ba66
BLAKE2b-256 6a2203a98a7f887c6246ab96fd25a0dddc14d34b2f6533a53889b5d37f183dad

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