adjacency-list-graphbuilder
A tiny utility to build an undirected adjacency-list graph from a list of edges.
If you don't provide n (the number of nodes), it's inferred automatically
from the highest node index found in edges.
Note: Version
0.1.0was published with an incorrect README that referenced an old package name (graphbuilder). The actual importable package name has always beenadjacency_list_graphbuilder. This has been corrected starting from version0.1.1. If you installed0.1.0, please upgrade usingpip install --upgrade adjacency-list-graphbuilder.
Install
pip install adjacency-list-graphbuilder
Usage
from adjacency_list_graphbuilder import build_graph
edges = [[0, 1], [0, 2], [1, 2], [2, 3], [1, 3]]
# n is optional — inferred automatically
graph = build_graph(edges)
print(graph)
# [[1, 2], [0, 2, 3], [0, 1, 3], [2, 1]]
# or provide n explicitly (e.g. to include isolated nodes)
graph = build_graph(edges, n=6)
print(graph)
# [[1, 2], [0, 2, 3], [0, 1, 3], [2, 1], [], []]
License
MIT
Metadata
Release files for adjacency-list-graphbuilder 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| adjacency_list_graphbuilder-0.1.1.tar.gz | 1.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| adjacency_list_graphbuilder-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.1 kB
Release files / adjacency_list_graphbuilder-0.1.1.tar.gz
| Download URL | adjacency_list_graphbuilder-0.1.1.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83beb42efb739b5eb8fdb1c8bb86b3f166c1626f7307bba31899fd025ae06347
|
|
BLAKE2b-256 checksum How to use checksums |
92a9332d644fc022b6f4c1b22d32e8a0c46095b8a8edd2690c42dd0cf29d1cee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / adjacency_list_graphbuilder-0.1.1-py3-none-any.whl
| Download URL | adjacency_list_graphbuilder-0.1.1-py3-none-any.whl |
|---|---|
| Size | 3.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8c18ffda1b168fc140930f5c09c5ca3b662c4f17f7e75294ccf102f5ba737214
|
|
BLAKE2b-256 checksum How to use checksums |
4077d38b0a6d3c1ba5021e61913deb2829a8773eb9c75dc18b70f99153e19708
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.7 {"installer":{"name":"uv","version":"0.10.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":null,"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for adjacency-list-graphbuilder 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.