# Ouroboros Graph
An implementation of an adjacency list graph representation with algorithm support. Named after the ancient symbol of a serpent eating its own tail.
## Installation
`pip3 install ouroboros-graph`
## Usage
```py
from ouroboros-graph 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()
```
Raw data
{
"_id": null,
"home_page": "https://github.com/williamvietnguyen/ouroboros-graph",
"name": "ouroboros-graph",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,graph,data,structure,data-structure",
"author": "William Nguyen",
"author_email": "williamvnguyen2@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/cb/fa/c4df578f905b6ecd4e422e95890547f67dd35c5f9c75ff5c4d4e51ee6c9c/ouroboros-graph-0.0.2.tar.gz",
"platform": null,
"description": "\n# Ouroboros Graph\n\nAn implementation of an adjacency list graph representation with algorithm support. Named after the ancient symbol of a serpent eating its own tail.\n\n## Installation\n\n`pip3 install ouroboros-graph`\n\n## Usage\n\n```py\nfrom ouroboros-graph import OuroborosGraph\n\nouroboros = OuroborosGraph(directed=True)\n# Each tuple in the edge list is (starting_node, ending_node, edge_value)\nouroboros.overwrite_graph(edge_list=[(1, 2, 7), (2, 3, 10)])\nouroboros.add_node(4)\nouroboros.add_edge(3, 4, value=7)\nouroboros.delete_node(2)\n# {(3, 4, 7)} - only 1 edge because node 2 is deleted\nedges = ouroboros.tuple_edges()\n```\n\n\n",
"bugtrack_url": null,
"license": "",
"summary": "A Graph Abstract Data Type",
"version": "0.0.2",
"split_keywords": [
"python",
"graph",
"data",
"structure",
"data-structure"
],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "fb8eb1ab462638825641f0860079d78b",
"sha256": "835368c06ac2e48a179e9efe7b0dce37cd0b759a55d3c5a33a226b3d93aa4f51"
},
"downloads": -1,
"filename": "ouroboros_graph-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "fb8eb1ab462638825641f0860079d78b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4434,
"upload_time": "2022-12-18T11:04:53",
"upload_time_iso_8601": "2022-12-18T11:04:53.101557Z",
"url": "https://files.pythonhosted.org/packages/79/fa/52c1ec01a5d44c3014934340ebcd52cebb8dc5dfb567fd34e9812b98cd8d/ouroboros_graph-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "efa98bcc40e7291f5828b8af96aeb169",
"sha256": "f19637a7472ea55ff0dceab0315ddb4725cad8df18900667c41a55153faabefb"
},
"downloads": -1,
"filename": "ouroboros-graph-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "efa98bcc40e7291f5828b8af96aeb169",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4942,
"upload_time": "2022-12-18T11:04:55",
"upload_time_iso_8601": "2022-12-18T11:04:55.026631Z",
"url": "https://files.pythonhosted.org/packages/cb/fa/c4df578f905b6ecd4e422e95890547f67dd35c5f9c75ff5c4d4e51ee6c9c/ouroboros-graph-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-12-18 11:04:55",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "williamvietnguyen",
"github_project": "ouroboros-graph",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ouroboros-graph"
}