node2vec-rs
Python bindings for node2vec-rs:
node2vec and metapath2vec graph embeddings. The Rust crate does the work,
parallel random walks and skip-gram trained with lock-free Hogwild! SGD on the
CPU. This is a thin layer over it. Hand in an edge list, get vectors back.
Documentation: https://gregorlueg.github.io/node2vec-rs/
This package versions separately from the Rust crate.
Install
uv pip install node2vec-rs
Wheels for Linux x86_64 and macOS (arm64 and x86_64), Python 3.10 and up.
Use
import node2vec_rs
src = ["a", "a", "b", "c", "c"]
dst = ["b", "c", "c", "d", "e"]
emb = node2vec_rs.node2vec(src, dst, dim=16, p=1.0, q=0.5)
emb.vectors # (5, 16) float32
emb.ids # node id per row
Typed graph, knowledge graph style? metapath2vec walks follow a schema over node types:
emb = node2vec_rs.metapath2vec(
src=["g1", "g2", "g3"],
dst=["p1", "p1", "p2"],
node_ids=["g1", "g2", "g3", "p1", "p2"],
node_types=["gene", "gene", "gene", "pathway", "pathway"],
metapath="gene-pathway-gene",
plus=True, # metapath2vec++
)
emb.vectors, emb.ids, emb.types, emb.walk_stats
Ids can be strings or integers. Edges go in as arrays, lists, tuples or polars
Series. With more than one thread the Hogwild! updates race, so pass
n_threads=1 if you need bit-identical vectors at a fixed seed.
References
Grover and Leskovec, node2vec: Scalable Feature Learning for Networks, KDD 2016.
Dong, Chawla and Swami, metapath2vec: Scalable Representation Learning for Heterogeneous Networks, KDD 2017.
Metadata
Release files for node2vec-rs 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| node2vec_rs-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl | CPython 3.10 | abi3 | Linux glibc 2.17+ x86-64 | Details for node2vec_rs-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
| node2vec_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl | CPython 3.10 | abi3 | macOS 11.0+ ARM64 | Details for node2vec_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
| node2vec_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl | CPython 3.10 | abi3 | macOS 10.12+ x86-64 | Details for node2vec_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
Total release size: 1.4 MB
Release files / node2vec_rs-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
| Download URL | node2vec_rs-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl |
|---|---|
| Size | 487.9 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 abi3 |
|
SHA-256 checksum How to use checksums |
36987e65d8628418c8ad010b642feda523963ae9267b3f774156132db4d2de1c
|
|
BLAKE2b-256 checksum How to use checksums |
31fd636c082ee2b5603ce1fd0996aaea869a101f33fe9381fbfacbb430aa29c8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 19, 2026.
Transparency logRelease files / node2vec_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl
| Download URL | node2vec_rs-0.1.0-cp310-abi3-macosx_11_0_arm64.whl |
|---|---|
| Size | 432.1 kB |
| Tags | CPython 3.10 abi3 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
683c7c69aec30878de7e22a001afda350997d2d524991593facba3ca69846872
|
|
BLAKE2b-256 checksum How to use checksums |
45abc61e2b09e744c0a7188ded04f36c4fc98d9cd325222278f7bd23f6735e38
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 19, 2026.
Transparency logRelease files / node2vec_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl
| Download URL | node2vec_rs-0.1.0-cp310-abi3-macosx_10_12_x86_64.whl |
|---|---|
| Size | 447.6 kB |
| Tags | CPython 3.10 abi3 macOS 10.12+ x86-64 |
|
SHA-256 checksum How to use checksums |
9622e288c7b51af856614d3e749a07945610a01578c2e92cbc9e25d7f05e3f2b
|
|
BLAKE2b-256 checksum How to use checksums |
9871311a1c01ef0ae33acd80effd9cc829a5d063937218d994bcd9c8a10cd955
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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 Nov 19, 2026.
Transparency logSecurity for node2vec-rs 0.1.0
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.
Full provenance
All 3 files in this release have been uploaded with provenance metadata.
Attestation for node2vec_rs-0.1.0-cp310-abi3-manylinux2014_x86_64.manylinux_2_17_x86_64.whl
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 Nov 19, 2026.
Transparency logA 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.