Skip to main content

A Python library to create and display STIX2 graphs

Project description

PySTIXView

Python PyPI version codecov Documentation Status Super-Linter License

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pystixview-0.1.0.tar.gz (8.0 MB view hashes)

Uploaded Source

Built Distribution

pystixview-0.1.0-py3-none-any.whl (8.0 MB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page