No project description provided
Project description
Graph Utils
Important:
This library is under active development and should be considered a work in progress with no guarantees of performance, correctness, or funcationality. Just don't use it yet, it'll be great when it's ready, I promise 😉
Hello! Meet rich_graph - a graph library that loves you and just wants you to be happy.
This library provides utility functions and pre-formed data structures for use when needing to represent data as a graph, with special attention paid to making those graphs easy to grok mentally by supporting the presence of arbitrary attributes on both nodes and edges. These attributes can be found in the node/edge's meta attribute, e.g. Node.meta = {"arbitrary": "attribute", "foo": "bar"}
Go forth and enjoy, and show some love by starring the repo on GitHub. Issues and Contributions are welcome!
Installation
Run the following to install:
pip install rich_graph
Example Usage
from rich_graph import structs, traversal
# Create a simple graph with 3 nodes and edges connecting them
graph = Graph()
node1 = Node(1)
node2 = Node(2)
node3 = Node(3)
graph.add_node(node1)
graph.add_node(node2)
graph.add_node(node3)
graph.add_edge(node1, node2)
graph.add_edge(node1, node3)
graph.add_edge(node2, node3)
Development
To install rich_graph, along with the tools and dependencies required to develop and run tests, run the following in your virtual environment:
pip install -e .[dev]
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rich_graph-0.0.2.tar.gz.
File metadata
- Download URL: rich_graph-0.0.2.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d524d883923855412a8b2121cab5545783c982e3458c35b77152f9093fdee3c2
|
|
| MD5 |
cb2d012ae451d124f977dd61ac255232
|
|
| BLAKE2b-256 |
695761696dd8027cf15d34eaa51f320bfe36d511854b69a7036a8b9cd7ee66be
|
File details
Details for the file rich_graph-0.0.2-py3-none-any.whl.
File metadata
- Download URL: rich_graph-0.0.2-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e955e0a1f8a794f73b59971167cc2a3b0b6eb9cb747a88397e4bf15482fba48c
|
|
| MD5 |
08b85e64833e0e34ff18bd37431f6af4
|
|
| BLAKE2b-256 |
338be5f283436b1e0382a31d03fbae113c7dc244eb43871838cd13bb9874542b
|