A Python library to create and display STIX2 graphs
Project description
PySTIXView
PySTXIView is a Python library to create and display STIX2 graphs.
PySTIXView is based on pyvis that allows you to create graph and visualize them in your browser or in Jupyter Notebook.
Installation
Requirements
- python3 (tested on python 3.12)
- pyvis
- stix2
Install from pip
pip install PySTIXview
Install from source code
git clone https://github.com/vincenzocaputo/PySTIXView
cd PySTIXView
python3 setup.py install
Usage
Below is a simple example to create a graph from the STIX2 Bundle Threat Actor Leveraging Attack Patterns and Malware. (The JSON file is available at https://github.com/oasis-open/cti-documentation/blob/main/examples/example_json/threat-actor-leveraging-attack-patterns-and-malware.json)
from pystixview import PySTIXView
stix_graph = PySTIXView()
with open("threat-actor-leveraging-attack-patterns-and-malware.json", "r") as fd:
stix_graph.add_bundle(fd.read())
stix_graph.save_graph("threat-actor-leveraging-attack-patterns-and-malware.html", width="100%", height="600px")
PySTIXView can be used also in Jupyter Notebook:
Documentation
Documentation is available here
Credits
- The resources used for examples and library tests are taken from https://oasis-open.github.io/cti-documentation/stix/examples.html.
- The images used in the library for the node icons are taken from https://github.com/freetaxii/stix2-graphics
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
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 pystixview-0.1.5.tar.gz.
File metadata
- Download URL: pystixview-0.1.5.tar.gz
- Upload date:
- Size: 7.9 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b15f1cc82128c38359eba3fa388f893ff8aae5cc1d764dfeb3664b64fc4d7ceb
|
|
| MD5 |
cb6173f66d052853da9e6488fd6d7a2c
|
|
| BLAKE2b-256 |
c66800cbdaf89151d0787f4d7e99177eb4c02d0ec118cb5a6b64ccb837196283
|
File details
Details for the file pystixview-0.1.5-py3-none-any.whl.
File metadata
- Download URL: pystixview-0.1.5-py3-none-any.whl
- Upload date:
- Size: 8.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67cdfd586c23a5ff83f13bb3f2ef99dcef58340087391fd4e662f3859add68c9
|
|
| MD5 |
8bb3badb26cdd6a9bb9606e074fe39f7
|
|
| BLAKE2b-256 |
8563e5aed06c071a9ade8469a2e443878f374c0e7e714f9ddcadaa7bcd7904f5
|