Discover contiguous network inventory
Discover all types of connected network equipment using CDP neighbor information.
Installation
Install package using pip
pip install cisco-discovery
Run Locally
Clone the project
git clone https://github.com/tkdebnath/cisco_discovery.git
Go to the project directory
cd cisco_discovery
Install dependencies
pip install -r requirements.txt
Environment Variables
To run this project, you will need to add the following environment variables to your .env file
NETMIKO_USERNAME="<username>"
NETMIKO_PASSWORD="<password>"
Usage/Examples
from cisco_discovery import runner
if __name__=='__main__':
host = input("Enter any IP of cisco router or switch")
# preference of passed username and password argument is higher than env variable
obj_discovery = runner(host=host, threads=10, username="username", password="password", env=".env")
"""
default value for directory= "output"
default value for file_name= datetime.now().strftime(r"%d_%m_%Y__%I-%M_%p")
"""
# Generate CSV file for nodes and edges
obj_discovery.to_csv_nodes(directory="output", file_name= "file_name")
obj_discovery.to_csv_edges(directory="output", file_name= "file_name")
# Generate Excel file for nodes and edges
obj_discovery.to_excel_nodes(directory="output", file_name= "file_name")
obj_discovery.to_excel_edges(directory="output", file_name= "file_name")
# Generate CSV for nodes and edges at once
obj_discovery.to_csv(directory="output", file_name= "file_name")
# Generate CSV for nodes and edges at once
obj_discovery.to_excel(directory="output", file_name= "file_name")
# Generate draw_io xml for nodes and edges
obj_discovery.to_draw_io(directory="output", file_name= "file_name")
Authors
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
cisco_discovery-1.1.tar.gz
(23.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file cisco_discovery-1.1.tar.gz.
File metadata
- Download URL: cisco_discovery-1.1.tar.gz
- Upload date:
- Size: 23.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2e44123d350e1e554253ba1d4639ebe023219849321386eb978c5d310afa25bd
|
|
| MD5 |
23bc061ca47a9caa1eb0a810804e761f
|
|
| BLAKE2b-256 |
83fcc761de8a975b7d7f0e42e647b3a930bd30b83d8e23bf7603db2c844993bc
|
File details
Details for the file cisco_discovery-1.1-py3-none-any.whl.
File metadata
- Download URL: cisco_discovery-1.1-py3-none-any.whl
- Upload date:
- Size: 25.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c504c49ff523d7bc758bdb49d15f881cd3f8a9a6b41a05c8c08becfff2e6d3c6
|
|
| MD5 |
1cf98ed4145bceec59e15138876e9107
|
|
| BLAKE2b-256 |
9ecd80b46f13ef110f5c1e25cba50cc2dbd45fb005d68b5b955ecd1e17a27e3a
|