webgraph-swh
Python bindings for accessing Software Heritage graphs, built on top of webgraph.
Provides bidirectional graph traversal with full access to node properties (SWHIDs, timestamps, persons, messages) for the SWH compressed graph.
Installation
pip install webgraph-swh
This automatically installs the webgraph package as a dependency.
Building from source
Pre-built wheels are compiled for a generic target. You should however enable native optimizations (e.g., BMI2 for faster succinct data structures) by building the wheel from source:
pip install maturin
git clone https://github.com/vigna/webgraph-py.git
cd webgraph-py/webgraph-swh
maturin build --release -o dist
pip install dist/*.whl
The repository's .cargo/config.toml sets target-cpu=native, so the
resulting wheel will be optimized for your CPU. We suggest to use the
same approach for webgraph.
Quick start
from webgraph_swh import SwhGraph, PyNodeType
# Load the SWH graph with all properties
g = SwhGraph("/path/to/swh-graph")
print(f"Nodes: {g.num_nodes()}")
# Traverse successors with properties
for s in g.successors(42):
print(g.swhid(s), g.node_type(s))
# Filter by node type
revrel = g.subgraph("rev,rel")
for s in revrel.successors(42):
print(revrel.author_id(s), revrel.author_timestamp(s))
# Access the underlying BvGraph
bv = g.forward_graph()
for root, parent, node, dist in bv.bfs():
...
Metadata
Release files for webgraph-swh 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
Total release size: 23.4 MB
Release files / webgraph_swh-0.1.4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Linux glibc 2.28+ x86-64 PyPy 3.11 PyPy 3.11 7.3 |
|
SHA-256 checksum How to use checksums |
f9a594cf2e1e28512a5ad5087330ff1cd8d19452978d8d7fdb499e4c754110b9
|
|
BLAKE2b-256 checksum How to use checksums |
fd42f76ba1c33a2576133a526d56c3da313675dcf2dd48c71cf332532a04e4f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp315-cp315t-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp315-cp315t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.15 CPython 3.15 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
2ef070f8173613f0e59c8c328debe7c7c91e0c21c9d40ed993fbde0a1e61c593
|
|
BLAKE2b-256 checksum How to use checksums |
c11b9c924634df2333a933d3d207d8e62da625e40e29fba2ab93cba41f9a0676
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp315-cp315-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp315-cp315-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.15 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9ca09571082397ad30e6d95bb7b5bf222b4e3d0511fdee9c69af576288eb376b
|
|
BLAKE2b-256 checksum How to use checksums |
05faec8a5ebd0c27424e626574f9d7e62a9d29c3fdda0c99d52c3da00b5ab5e1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp314-cp314t-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp314-cp314t-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 CPython 3.14 free-threading Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
38c5606dc4b29dca62692165df86d17919841de52859c33432c9cf11ce8f7c4c
|
|
BLAKE2b-256 checksum How to use checksums |
71c804818616f0041360880824d1cd5af31210ad3d540bbe9fac4e9a953eaaa5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
af7660f3cddecc39f898e4b6b96844c40dc23cc321a01f6ffa1d498fa431cd1f
|
|
BLAKE2b-256 checksum How to use checksums |
5d07b08f0d8e54908924d38bae3908419214e6155a4a97fc59f80d25ffb74f15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp314-cp314-macosx_11_0_arm64.whl
| Download URL | webgraph_swh-0.1.4-cp314-cp314-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.14 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7b81c4bfbef63285363aacd53d16b65b8a00d31d301cba0133851acb4070025c
|
|
BLAKE2b-256 checksum How to use checksums |
69630b4d51f965b6dda4ade6128e811e78aca07fdb569525f01a43114936eb28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp314-cp314-macosx_10_12_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp314-cp314-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.14 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
2430ed8daf3ef0d15d922c12db4d3858a93633a5a941cea1e239ab8033e29abc
|
|
BLAKE2b-256 checksum How to use checksums |
94d333aee5814f6a84ed75496b3844b4abbb8992e3f86b4449329678befc4bc7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
9977ba88dc3689bc3ae7cd7230069b67fe03324aefc6e7e385ebdf9d71bff6f8
|
|
BLAKE2b-256 checksum How to use checksums |
17c0773a40e3817bb0356ee0985978088d4fe9ca549d96473cdc2e1f9f820a6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | webgraph_swh-0.1.4-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
65544766a1f898a8d45ec3e361f80237f6e5bde2fd28139ca93110328b81e48b
|
|
BLAKE2b-256 checksum How to use checksums |
cdf98b8308fc87d50dbaebd129f7f9254b91257fa4c46b63691d54f4a15d32d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp313-cp313-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.13 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
aed2efbc25d0e20ad2fc2486251efd55bb80f5b66f01e300035f74cee2e0d294
|
|
BLAKE2b-256 checksum How to use checksums |
bca2e1b2e7b2386240646aad4fe1d500ebb9140b1cecc6acfb3bdfcb9a4db384
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
269da1d5c8638345878f8b18e29e412ce5ad211e134c5cdbe296095c115dfcb0
|
|
BLAKE2b-256 checksum How to use checksums |
11b9e14c7d3c35cff257520de561401db9904ecdc3ceb589431fc118b3eb120d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | webgraph_swh-0.1.4-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
490e3338ee947375eda7d20b2b9bb4f854e4dcd23d8437b51b1566a1bb325d59
|
|
BLAKE2b-256 checksum How to use checksums |
4a9d7c7ea9bdacea96adaa5eb907319dcac6cfd4641a35c99620e2dabc411687
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp312-cp312-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.12 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
20326d123a7974604bb5c4bdcfee8ede0131652332957bb4d2a21e8eb9166883
|
|
BLAKE2b-256 checksum How to use checksums |
97964e56565d7198c4448bde490226fc0d2201fdbef89f95523fc6fd047ed4f1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp311-cp311-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp311-cp311-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.11 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
8b0fb5cb0af134f8b3b81ebc4b77c3a0b657693f617d89df81df8632aad3bcc2
|
|
BLAKE2b-256 checksum How to use checksums |
d9fd2e45de580201c0a125560a5aaeb7c24af97112f9d34808fd93d07a66a1ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | webgraph_swh-0.1.4-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
d23fa10a1180ca83f2d1d8504f740d7f9d54af57ab1e6e1c3bb3cad41968cf39
|
|
BLAKE2b-256 checksum How to use checksums |
67e4306757df40d4f267bcdc9ff576dcc6eed925cb703d2d164da2c16ac3db32
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp311-cp311-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.11 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
bd1030164c2d6f743cc2037c8b0268413ad7ef8e9ce955668a74505aab873ffa
|
|
BLAKE2b-256 checksum How to use checksums |
d957aa57e65d467ee5c1b3c918639311df12a6eed584455a83de30bc5b342bdf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp310-cp310-manylinux_2_28_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp310-cp310-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | CPython 3.10 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
e0eb5f263e14aa29aa84d2e956b93636fedd92e02ce74fb6e547e8b16f4b31f0
|
|
BLAKE2b-256 checksum How to use checksums |
8bb9240d67f3a555328883a9e79da897cf9b362d2bfbe16b4b1d656c60d06660
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | webgraph_swh-0.1.4-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e27a16ebec972810fce0c154e8d1fa62dec89df17ab03575a4c95cb42ad74f79
|
|
BLAKE2b-256 checksum How to use checksums |
8b299af5223eff33c10749095554ec98f2605aa559a160f8eccc06668d5ba159
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency logRelease files / webgraph_swh-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl
| Download URL | webgraph_swh-0.1.4-cp310-cp310-macosx_10_12_x86_64.whl |
|---|---|
| Size | 1.2 MB |
| Tags | CPython 3.10 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
daaf3920eedcce1ab25b0b01e8c6261972d6fce02443b7878aeb550e8161a37e
|
|
BLAKE2b-256 checksum How to use checksums |
c4d2dae113ffa65cf563800b098cf55240747c50de0d72fc00cc547f14c97029
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jul 23, 2026.
Transparency log