Graph parsing for arx net (https://dwarakesh-v.github.io/arx-net/) and graph representation conversion library.
Project description
Arx-Net
A lightweight Python library for parsing graph edge strings and converting between common graph representations.
Installation
pip install arx-net
Features
-
Parse edge strings
-
Directed and undirected graphs
-
Weighted and unweighted graphs
-
Convert between
- adjacency lists
- edge lists
- adjacency matrices
Example
import arx_net
graph = arx_net.parse_edges(
"(A,B,4),(B,C,2),(C,D)"
)
print(graph)
Output
{
"A": [("B",4)],
"B": [("C",2)],
"C": [("D",1)],
"D": []
}
Convert formats
edges = arx_net.convert_type(graph, "edge")
matrix, order = arx_net.convert_type(graph, "matrix")
Supported formats
Adjacency List
{
"A": ["B", "C"]
}
Edge List
[
("A","B"),
("A","C")
]
Matrix
[
[0,1,1],
[0,0,1],
[0,0,0]
]
License
MIT
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 arx_net-0.1.0.tar.gz.
File metadata
- Download URL: arx_net-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
347b4f6380a8880d56564c769e47776e065b50cf679a0df191a7ec37656e6f53
|
|
| MD5 |
4ad8ba445a796e903ccf853ffd65a80d
|
|
| BLAKE2b-256 |
883fe2a44a56fd56c1cca6c5b90086fd3f228467ee9d42ab52ae7607a75c907b
|
File details
Details for the file arx_net-0.1.0-py3-none-any.whl.
File metadata
- Download URL: arx_net-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4fe7e0609ead77179913467142d203aaab86eba9bbe9707dcd93c5ad1437b1ab
|
|
| MD5 |
5b632afe50188872771088ed3300f8fb
|
|
| BLAKE2b-256 |
d84d8fbda69a30909ecee4d285e6a46df4fac303c3e1ee92ef48543d31d618dc
|