Skip to main content

A Graph Abstract Data Type

Project description

Ouroboroslib

A Graph Abstract Data Type Library. Named after the symbol of a serprent eating its own tail.

Installation

pip3 install ouroboroslib

Usage

from ouroboroslib import OuroborosGraph

ouroboros = OuroborosGraph(directed=True)
# Each tuple in the edge list is (starting_node, ending_node, edge_value)
ouroboros.overwrite_graph(edge_list=[(1, 2, 7), (2, 3, 10)])
ouroboros.add_node(4)
ouroboros.add_edge(3, 4, value=7)
ouroboros.delete_node(2)
# {(3, 4, 7)} - only 1 edge because node 2 is deleted
edges = ouroboros.tuple_edges()

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

ouroboroslib-0.0.2.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

ouroboroslib-0.0.2-py3-none-any.whl (4.4 kB 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