Skip to main content

A Simple Graph Library with Visualization Support

Project description

Graphius

Graphius is a python library for creating and visualizing graphs. It has algorithms for finding shortest paths, minimum spanning trees, and more. You can visualize the graphs and algorithms step by step. You can use graphius with Jupyter notebooks or as a standalone application.

For examples see the examples notebook.

Installation

pip install graphius

If you want to use the visualization features you need to install graphviz. See graphviz.org/download for installation instructions.

Usage

from graphius import Graph

adjacency_list = {
    's': [('t', 10), ('y', 5)],
    't': [('x', 1), ('y', 2)],
    'x': [('z', 4)],
    'y': [('t', 3), ('x', 9), ('z', 2)],
    'z': [('s', 7), ('x', 6)]
}

g = Graph(adjacency_list, weighted=True, directed=True)
g.dijkstra('s', visualized=True, gif_path='dijkstra.gif')

dijsktra.gif:

dijkstra

This project is licensed under the MIT License - see the LICENSE file for details

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

graphius-0.1.0.tar.gz (2.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

graphius-0.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file graphius-0.1.0.tar.gz.

File metadata

  • Download URL: graphius-0.1.0.tar.gz
  • Upload date:
  • Size: 2.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.9

File hashes

Hashes for graphius-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4a320d5033fcf9e26caa4c6124f125eaf48a7108f89694c35b19d1d24d6e2afd
MD5 1cdd1db5dd5eea6970fd84f53c7131ab
BLAKE2b-256 de72b5080a0c50c0e5a25078c1a30f33608caf1b6ccdeb844109435b1f647398

See more details on using hashes here.

File details

Details for the file graphius-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: graphius-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.9

File hashes

Hashes for graphius-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7740b650a1e546efe087b72fb248aa912ebb3d09c7005208b28a140f932f1206
MD5 703fe79272d9dc8f006f772405288429
BLAKE2b-256 a8450b2975b25308f0d0eb5a6f77d000de3ddb1de73ab97a77d8f9739ce9792b

See more details on using hashes here.

Supported by

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