Skip to main content

Python bindings for Software Heritage graph access (built on webgraph)

Project description

webgraph-swh

Building from source

Pre-built wheels are compiled for a generic x86-64 target. If you need native optimizations (e.g., BMI2 for faster succinct data structures), you can build 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.

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.

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():
    ...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

webgraph_swh-0.1.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded PyPymanylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp314-cp314-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.14macOS 11.0+ ARM64

webgraph_swh-0.1.1-cp314-cp314-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.14macOS 10.12+ x86-64

webgraph_swh-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp313-cp313-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.13macOS 11.0+ ARM64

webgraph_swh-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.13macOS 10.12+ x86-64

webgraph_swh-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp312-cp312-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.12macOS 11.0+ ARM64

webgraph_swh-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.12macOS 10.12+ x86-64

webgraph_swh-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp311-cp311-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

webgraph_swh-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.11macOS 10.12+ x86-64

webgraph_swh-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.28+ x86-64

webgraph_swh-0.1.1-cp310-cp310-macosx_11_0_arm64.whl (1.1 MB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

webgraph_swh-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl (1.2 MB view details)

Uploaded CPython 3.10macOS 10.12+ x86-64

File details

Details for the file webgraph_swh-0.1.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ea78b5175bccae2ebe19a98c79e57154ae64dc2836f5306f17ad280ee8b7f6c3
MD5 af272f995b73c85a3bebc90e6b0dc43f
BLAKE2b-256 72688a2242207b0f66350c0ab9d915ef0315235fc6f377e0b469926726fe249e

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-pp311-pypy311_pp73-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 888f5dd708399a1f3407b7bcc526f0a4400101f557036df037b8f09dde157b3b
MD5 353c892b39cbb0b018a2bb4d947ec154
BLAKE2b-256 f7c44281312f3ad7db58e7c7b6f7c359763ffcffa18b339859cce24fb5407553

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp314-cp314-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp314-cp314-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp314-cp314-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 f3102a0f2ad10f4386b2c2be3dcb373636e8b4db01845536b8b039f7e5d5bfaa
MD5 05cdd99e2e8d5e22431d95d573cf832a
BLAKE2b-256 cfe5602b33bb5a3392780ee22018c01dd6a9e3ec9202168e16b522982ed72517

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp314-cp314-macosx_11_0_arm64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp314-cp314-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp314-cp314-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 817f8c9002ec62df488f893a370e4ff23b3bffad00dbf557fa000cff2727d8ac
MD5 b80eaed43d4ea186c14aa092d3607215
BLAKE2b-256 36565696a8888539ae7dae41f1fdfc411111f2b41ece1d0c26dcf814fce9cfa6

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp314-cp314-macosx_10_12_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 931a62709f5e6b8d62c490469e55f9f6995ecbb8b134bade4e12029de9304022
MD5 f6cb26300ad79519ed6f842c64757978
BLAKE2b-256 85f26d489b33b330b04d217ae6264fe6478f63df996f3feb9402b0b5248335f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp313-cp313-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp313-cp313-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp313-cp313-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 eb0194c24c37140bf00f974b3133000286f1c65060907756206b2106377c7f72
MD5 db5e307b7d0bfc28755a46249b6643f6
BLAKE2b-256 17f8357f887435970e30b4287e8d9d2f306d7eaddb42b2b2ffad5771e56a49a8

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp313-cp313-macosx_11_0_arm64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 46e7f8cb75415effe42dcaed50b15debca86151dbcd18b1ac48065e47d9a26c0
MD5 1e283b5c1a65b4bcdb59e23cb3b38e8f
BLAKE2b-256 3adab58d78f768bc247b18e0f9de5e0cc0455cb66a7f73ff8c841f22e3403f37

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp313-cp313-macosx_10_12_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c359af95409ab472ba7aa4f5be5c67d5468f8e6612688123837b85bad0b2f2c1
MD5 8e2e3b696f638750a923ac18000a10df
BLAKE2b-256 be864ef2fbbe9f7905c1435530362ed81ca6037aa05c56844da4f7b86768d625

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp312-cp312-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp312-cp312-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp312-cp312-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 a876d7b130d1efa1eddcf7aad5d8be27b6b5b055bcbd013bbeb14f85e93855ba
MD5 4695d7f7e1e24e8c9840bfef975e6aed
BLAKE2b-256 fba5272db67b19780ec8f5f5968c5a044ab7c6eb7aeb7d204f1d5e24a0c295af

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp312-cp312-macosx_11_0_arm64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 bed47e57c05e6dbf6db786f6ec3bb9903b86b551c9b804cddb971d0e6703e935
MD5 a7809f192a59eea5d7e0e9127b18f34a
BLAKE2b-256 fa822846457e97db91b0567adbc95dfaa92eae5b865e2fe544e761e9077f2679

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp312-cp312-macosx_10_12_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 bf1e76d87403e42af37d756adb45ad9a57735dafbe1eb588005d219df2856791
MD5 6886df1864b102f95861716b30ce1fae
BLAKE2b-256 1f601fba65d5b3ff72e116226ee48927844cd9cdb25c0fbdc60fb67a949d24d0

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp311-cp311-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 d678df7ef349e7130306ca2e9832a4d77fcf9be5c9c108efe6e12fcfa4757c89
MD5 ebd5d7b989981d29aade5e98b90659a0
BLAKE2b-256 9e9490ee38e2fde5766920ebe7a29c48610941658fc916fdbe6134aa0ae81d35

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 3f924542c77d1af78ee9f3bbd607cdca492f9c3e1ca78f45f1d32e2fdab8a0b0
MD5 8e564d9332b36413f8d3a0079c371b4c
BLAKE2b-256 463a9997e576b957c1dad1c63a9053dcf2333ee4120f16615ce802287b02c3d3

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp311-cp311-macosx_10_12_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 33afc3847cdac1aaad346cbfb72b21a5770999aa2dd67908896fb7dce5950cac
MD5 3d134eaff4bd898ea74b814a461e8d41
BLAKE2b-256 71c4bf030e93a3e165e7b495a629e14dbb64a6d5218cc8dd4cec02826a96fde8

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp310-cp310-manylinux_2_28_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 15c07945b4783fb8e34b09d7b2d7ca64cc444b7cc9db82180b05d8ef2205ff4b
MD5 339d12c1eb09ded8fb1da6ae10dac9c1
BLAKE2b-256 c001f9794760f444025194a19d0d4632dc637b24408e3c516223ca96735f0c3b

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file webgraph_swh-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl.

File metadata

File hashes

Hashes for webgraph_swh-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm Hash digest
SHA256 248867acfdeac0fc291c2341bbafed0c720497e9e06dc7575b8f6350fe2e85bf
MD5 3eb09010d4f312a3241ca768f16f0133
BLAKE2b-256 99c158946bf1ab45d6bc60b7776d1ab562ec8d54190c8807c17e85c222b4ff28

See more details on using hashes here.

Provenance

The following attestation bundles were made for webgraph_swh-0.1.1-cp310-cp310-macosx_10_12_x86_64.whl:

Publisher: workflow.yml on vigna/webgraph-py

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page