**Got questions, feedback, or feature requests? Join our community on [Slack!](https://join.slack.com/t/batfish-org/shared_invite/enQtMzA0Nzg2OTAzNzQ1LTcyYzY3M2Q0NWUyYTRhYjdlM2IzYzRhZGU1NWFlNGU2MzlhNDY3OTJmMDIyMjQzYmRlNjhkMTRjNWIwNTUwNTQ)**
[![codecov](https://codecov.io/gh/batfish/pybatfish/branch/master/graph/badge.svg)](https://codecov.io/gh/batfish/pybatfish)
# Pybatfish
Pybatfish is a Python client for [Batfish](https://github.com/batfish/batfish).
## What is Batfish?
Batfish is a network validation tool that provides correctness guarantees for security, reliability, and compliance by analyzing the configuration of network devices. It builds complete models of network behavior from device configurations and finds violations of network policies (built-in, user-defined, and best-practices).
A primary use case for Batfish is to validate configuration changes *before* deployment (though it can be used to validate deployed configurations as well). Pre-deployment validation is a critical gap in existing network automation workflows. By Batfish in automation workflows, network engineers can close this gap and ensure that only correct changes are deployed.
**Batfish does NOT require direct access to network devices.** The core analysis requires only the configuration of network devices. This analysis may be enhanced using additional information from the network such as:
* BGP routes received from external peers
* Topology information represented by LLDP/CDP
See [www.batfish.org](http://www.batfish.org) for technical information on how it works.
## What kinds of correctness checks does Batfish support?
[![Getting to know Batfish](batfish_video.png)](https://www.youtube.com/channel/UCA-OUW_3IOt9U_s60KvmJYA/videos)
The [Batfish YouTube channel](https://www.youtube.com/channel/UCA-OUW_3IOt9U_s60KvmJYA/videos) (which you can subscribe to for new content) illustrates many types of checks. These checks span a range of network behaviors and device configuration attributes.
#### Configuration Compliance
* Flag undefined-but-referenced or defined-but-unreferenced structures (e.g., ACLs, route maps)
* Configuration settings for MTUs, AAA, NTP, logging, etc. match templates
* Devices can only be accessed using SSHv2 and password is not null
#### Reliability
* End-to-end reachability is not impacted for any flow after any single-link or single-device failure
* Certain services (e.g., DNS) are globally reachable
#### Security
* Sensitive services can be reached only from specific subnets or devices
* Paths between endpoints are as expected (e.g., traverse a firewall, have at least 2 way ECMP, etc...)
#### Change Analysis
* End-to-end reachability is identical across the current and a planned configuration
* Planned ACL or firewall changes are provably correct and causes no collateral damage for other traffic
* Two configurations, potentially from different vendors, are functionally equivalent
## How do I get started?
If you haven't already installed Batfish, follow the instructions listed in the [batfish github repository](https://github.com/batfish/batfish/blob/master/README.md) to do so.
### Install Pybatfish
We highly recommend that you install Pybatfish in a Python 3 virtual environment. Details on how to set one up can be found [here](https://docs.python.org/3/library/venv.html). Once your virtual environment is setup and activated, upgrade pip and then install pybatfish.
```
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade pybatfish
```
Now, you are ready to evaluate your own network with Batfish. We encourage you to use Jupyter notebooks as your starting point, but you can use other methods that you are a comfortable with, e.g., an IDE like PyCharm or an interactive Python shell. If you choose to use Jupyter notebooks as your starting point, you need to install Jupyter in your virtual environment. Jupyter documentation can be found [here](http://jupyter.org/install) - but the commands below will get you going.
```
python3 -m pip install jupyter
jupyter notebook
```
Our notebooks provide a quick start guide for different use cases. Beyond that, the complete documentation is available on [readthedocs](https://pybatfish.readthedocs.io/en/latest/quickstart.html).
### Pybatfish documentation
Complete documentation of pybatfish APIs is [here](https://pybatfish.readthedocs.io/en/latest/).
Raw data
{
"_id": null,
"home_page": "https://github.com/batfish/pybatfish",
"name": "pybatfish",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "network configuration verification",
"author": "The Batfish Open Source Project",
"author_email": "pybatfish-dev@intentionet.com",
"download_url": null,
"platform": null,
"description": "**Got questions, feedback, or feature requests? Join our community on [Slack!](https://join.slack.com/t/batfish-org/shared_invite/enQtMzA0Nzg2OTAzNzQ1LTcyYzY3M2Q0NWUyYTRhYjdlM2IzYzRhZGU1NWFlNGU2MzlhNDY3OTJmMDIyMjQzYmRlNjhkMTRjNWIwNTUwNTQ)**\n\n[![codecov](https://codecov.io/gh/batfish/pybatfish/branch/master/graph/badge.svg)](https://codecov.io/gh/batfish/pybatfish)\n\n# Pybatfish\n\nPybatfish is a Python client for [Batfish](https://github.com/batfish/batfish).\n\n\n## What is Batfish?\n\nBatfish is a network validation tool that provides correctness guarantees for security, reliability, and compliance by analyzing the configuration of network devices. It builds complete models of network behavior from device configurations and finds violations of network policies (built-in, user-defined, and best-practices).\n\nA primary use case for Batfish is to validate configuration changes *before* deployment (though it can be used to validate deployed configurations as well). Pre-deployment validation is a critical gap in existing network automation workflows. By Batfish in automation workflows, network engineers can close this gap and ensure that only correct changes are deployed.\n\n**Batfish does NOT require direct access to network devices.** The core analysis requires only the configuration of network devices. This analysis may be enhanced using additional information from the network such as:\n* BGP routes received from external peers\n* Topology information represented by LLDP/CDP\n\nSee [www.batfish.org](http://www.batfish.org) for technical information on how it works.\n\n## What kinds of correctness checks does Batfish support?\n\n[![Getting to know Batfish](batfish_video.png)](https://www.youtube.com/channel/UCA-OUW_3IOt9U_s60KvmJYA/videos)\n\nThe [Batfish YouTube channel](https://www.youtube.com/channel/UCA-OUW_3IOt9U_s60KvmJYA/videos) (which you can subscribe to for new content) illustrates many types of checks. These checks span a range of network behaviors and device configuration attributes.\n#### Configuration Compliance\n* Flag undefined-but-referenced or defined-but-unreferenced structures (e.g., ACLs, route maps)\n* Configuration settings for MTUs, AAA, NTP, logging, etc. match templates\n* Devices can only be accessed using SSHv2 and password is not null\n#### Reliability\n* End-to-end reachability is not impacted for any flow after any single-link or single-device failure\n* Certain services (e.g., DNS) are globally reachable\n#### Security\n* Sensitive services can be reached only from specific subnets or devices\n* Paths between endpoints are as expected (e.g., traverse a firewall, have at least 2 way ECMP, etc...)\n#### Change Analysis\n* End-to-end reachability is identical across the current and a planned configuration\n* Planned ACL or firewall changes are provably correct and causes no collateral damage for other traffic\n* Two configurations, potentially from different vendors, are functionally equivalent\n\n## How do I get started?\n\nIf you haven't already installed Batfish, follow the instructions listed in the [batfish github repository](https://github.com/batfish/batfish/blob/master/README.md) to do so.\n\n### Install Pybatfish\nWe highly recommend that you install Pybatfish in a Python 3 virtual environment. Details on how to set one up can be found [here](https://docs.python.org/3/library/venv.html). Once your virtual environment is setup and activated, upgrade pip and then install pybatfish.\n\n```\npython3 -m pip install --upgrade pip\npython3 -m pip install --upgrade pybatfish\n```\n\nNow, you are ready to evaluate your own network with Batfish. We encourage you to use Jupyter notebooks as your starting point, but you can use other methods that you are a comfortable with, e.g., an IDE like PyCharm or an interactive Python shell. If you choose to use Jupyter notebooks as your starting point, you need to install Jupyter in your virtual environment. Jupyter documentation can be found [here](http://jupyter.org/install) - but the commands below will get you going.\n\n```\npython3 -m pip install jupyter\njupyter notebook\n```\n\nOur notebooks provide a quick start guide for different use cases. Beyond that, the complete documentation is available on [readthedocs](https://pybatfish.readthedocs.io/en/latest/quickstart.html).\n\n### Pybatfish documentation\n\nComplete documentation of pybatfish APIs is [here](https://pybatfish.readthedocs.io/en/latest/).\n",
"bugtrack_url": null,
"license": "Apache License 2.0",
"summary": "Python API and utilities for Batfish",
"version": "2024.7.22.1569",
"project_urls": {
"Homepage": "https://github.com/batfish/pybatfish"
},
"split_keywords": [
"network",
"configuration",
"verification"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "48c3591e6da5dd3db22dd2741358aff4093c984e7e9cb44c533f91da621c302f",
"md5": "1c949f1e1a37f7c325177cd0af582d81",
"sha256": "46dc99354c1389e3679c727c783cf7c3354114decef713eaeadd71a9451815a5"
},
"downloads": -1,
"filename": "pybatfish-2024.7.22.1569-py3-none-any.whl",
"has_sig": false,
"md5_digest": "1c949f1e1a37f7c325177cd0af582d81",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 90831,
"upload_time": "2024-07-23T06:12:44",
"upload_time_iso_8601": "2024-07-23T06:12:44.936548Z",
"url": "https://files.pythonhosted.org/packages/48/c3/591e6da5dd3db22dd2741358aff4093c984e7e9cb44c533f91da621c302f/pybatfish-2024.7.22.1569-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-23 06:12:44",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "batfish",
"github_project": "pybatfish",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"lcname": "pybatfish"
}