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
pip 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
Metadata
Release files for pystixview 0.1.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pystixview-0.1.7.tar.gz | 7.9 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pystixview-0.1.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.0 MB
Release files / pystixview-0.1.7.tar.gz
| Download URL | pystixview-0.1.7.tar.gz |
|---|---|
| Size | 7.9 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
351c39499e5ab785e753c2ae2343539c246f4563f5f01e87e1a384677f47e4a0
|
|
BLAKE2b-256 checksum How to use checksums |
63210be3a914f298704c36e3d545e1c2a76056b67c0f5b6d18e126a0aea66623
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / pystixview-0.1.7-py3-none-any.whl
| Download URL | pystixview-0.1.7-py3-none-any.whl |
|---|---|
| Size | 8.1 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2054ef1f65c3f7b14c19e5b2b97bd7542612f32d72c28fa3069ee383c25eaefa
|
|
BLAKE2b-256 checksum How to use checksums |
a1d3497ee4cd12d92c51cb8fad06f74e9e3ab74e4aa08896b5586550f717abe0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|