Helios Network (Python)
Python bindings for the Helios Network C core.
Quick start
from helios_network import AttributeScope, AttributeType, Network
network = Network(directed=False)
node_ids = network.add_nodes(3)
network.add_edges([(node_ids[0], node_ids[1])])
network.define_attribute(AttributeScope.Node, "weight", AttributeType.Double, 1)
network.nodes["weight"] = 1.0
# Auto-define attributes on assignment
network.nodes["score"] = 2.5
network.define_attribute(AttributeScope.Network, "title", AttributeType.String, 1)
network.network["title"] = "demo"
print(network.graph["title"])
network["title"] = "demo2"
# Node access
print(network.nodes[node_ids[0]]["weight"])
network.nodes[[node_ids[0], node_ids[1]]]["weight"] = [2.0, 3.0]
for node in network.nodes:
node["weight"] = 4.0
Selectors
network.nodes[id]returns a node viewnetwork.nodes[[id1, id2]]returns a selector for active nodesnetwork.nodes["attr"]returns a list of attribute values for active nodesnetwork.nodes["attr"] = valueassigns a constant to all active nodesnetwork.nodes[[id1, id2]]["attr"] = [v1, v2]assigns per-node values
Edge access mirrors node access via network.edges, with network.edges.pairs() yielding (source, target) tuples.
For large generated graphs, avoid materializing Python (source, target) tuples:
from array import array
network.add_nodes(1_000_000)
network.add_edges_from_arrays(
array("I", sources),
array("I", targets),
)
Network Generators
The Python package exposes native generators as module-level constructors:
from helios_network import generate_watts_strogatz
network = generate_watts_strogatz(
5_000,
neighbor_level=2,
rewiring_probability=0.01,
seed=1,
)
Available generators include generate_stochastic_block_model,
generate_barabasi_albert, generate_watts_strogatz,
generate_random_geometric, generate_waxman,
generate_configuration_model, and generate_lattice_2d.
Edge indices
for edge_id, (source, target) in network.edges.with_indices():
print(edge_id, source, target)
Measurements and Community Detection
The Python wrapper exposes the native measurement APIs:
degree = network.measure_degree(direction="both")
components = network.measure_connected_components(mode="weak")
leiden = network.leiden_modularity(
resolution=1.0,
seed=42,
out_node_community_attribute="community",
)
leiden_modularity(...) is an alias for measure_leiden_modularity(...). It
writes an unsigned-integer node attribute and returns community_count,
modularity, and values_by_node.
To label only major components for filtering or visualization:
major = network.label_major_components(
mode="weak",
max_components=3,
min_size=100,
out_node_component_attribute="major_component",
)
Selected components receive rank labels 1..N by decreasing size. Other nodes
receive 0 by default.
The Leiden comparison harness in research/benchmarks/leiden_compare/ uses a
conda environment file:
conda env create -f research/benchmarks/leiden_compare/environment.yml
conda run -n helios-leiden-compare python -m pip install -e python --no-build-isolation
conda run -n helios-leiden-compare python research/benchmarks/leiden_compare/compare_leiden.py
Installation
Standard install:
python -m pip install ./python --upgrade
Editable install (recommended during development):
python -m pip install -e python --no-build-isolation
mesonpy editable builds require --no-build-isolation.
If editable install fails, install build tools in the active environment:
python -m pip install meson ninja meson-python
python -m pip install -e python --no-build-isolation
Optional conversions
NetworkX and igraph conversions are optional. Install when needed:
python -m pip install networkx
python -m pip install igraph
UMAP export
Install the optional UMAP stack when you want a Helios-ready fuzzy graph or kNN graph export:
python -m pip install ./python[umap]
from helios_network import HeliosUMAP
umap_export = HeliosUMAP(
n_neighbors=15,
min_dist=0.1,
build_knn_network=True,
)
network = umap_export.fit_network(X)
network.save_bxnet("embedding.bxnet")
# Optional directed kNN export
umap_export.knn_network_.save_zxnet("embedding-knn.zxnet")
If you want only the UMAP graph construction output for helios-web-next
to lay out from scratch, use the graph-only export path instead:
graph_network = umap_export.fit_graph_network(X)
graph_network.save_zxnet("umap-graph.zxnet")
The fit graph export writes:
- node attributes:
umap_embedding,_helios_visuals_position,umap_mass - edge attribute:
umap_weight - network attributes that let
helios-web-nextauto-enable UMAP force mode on import
The graph-only export writes the same UMAP edge weights and graph metadata, but
omits umap_embedding and _helios_visuals_position so helios-web-next can
start its own realtime UMAP-like layout from scratch.
Examples
From python/:
python examples/basic_usage.py
python examples/toroidal_dimensions_table.py
python examples/toroidal_dimensions_plot.py --skip-plot
python examples/toroidal_dimensions_plot.py
python examples/toroidal_dimensions_plot.py --large --skip-plot
python examples/generate_umap_example_networks.py --sizes 200 2000 20000
toroidal_dimensions_plot.py uses matplotlib for plotting local dimension curves. Install it with:
python -m pip install matplotlib
Vector attributes
Attributes with dimension > 1 accept vector assignments:
network.define_attribute(AttributeScope.Node, "i3", AttributeType.Integer, 3)
network.nodes["i3"] = [1, 2, 3] # broadcast to all nodes
network.nodes[[0, 1]]["i3"] = [[4, 5, 6], [7, 8, 9]]
Metadata
Release files for helios-network 0.10.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| helios_network-0.10.4.tar.gz | 1.8 MB | Details |
Built distributions (wheels)
Total release size: 7.5 MB
Release files / helios_network-0.10.4.tar.gz
| Download URL | helios_network-0.10.4.tar.gz |
|---|---|
| Size | 1.8 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6da1ba7c516da6bae26b96474983057eaa6a5122c8d474ba382b1189c9ec897e
|
|
BLAKE2b-256 checksum How to use checksums |
0097c33c5980f927382f946a74f295db4f98fe958654f25b897a27cfbb25d03c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp313-cp313-win_amd64.whl
| Download URL | helios_network-0.10.4-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 504.1 kB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
d62e4620e5f377741bf26004251ab64b8c2ccc63561e6ee9a044b4d6539b2421
|
|
BLAKE2b-256 checksum How to use checksums |
1e0da534bbaace5422fa3cee9ed54ad4c5639dbc2d00dbe1c68a6e534d15938e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | helios_network-0.10.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 366.9 kB |
| Tags | CPython 3.13 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
b3875a3c6888711ecfaddb56ff8e248d7a39f942f4568883174d48cce5bf9c20
|
|
BLAKE2b-256 checksum How to use checksums |
d05a6bab6c79e45cc408cd44326a49f0ec050f15578d674b8fdd23d911bd0af2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp313-cp313-macosx_11_0_arm64.whl
| Download URL | helios_network-0.10.4-cp313-cp313-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.5 kB |
| Tags | CPython 3.13 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
130ab011dd49c345537b1f34ec0cef05074507e02f67abd06a7ade0aa7ea0a3a
|
|
BLAKE2b-256 checksum How to use checksums |
cbd0c3e3aff200d971b16da594deb1c706b4e8b2d34e7b94b8eba852e4604c69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp312-cp312-win_amd64.whl
| Download URL | helios_network-0.10.4-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 504.1 kB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
17329d48acd236008704994bb103878ab21a72962c6f432710be4c08b28c5d2b
|
|
BLAKE2b-256 checksum How to use checksums |
3641616586f88e4999c2debc0b0c64c898a4eb69fa9d1ad09f780c48085b48cb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | helios_network-0.10.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 367.0 kB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
ac0b55652d671c9700f4a8eb2f3206d7fd7d6ac55c000dbf8f8f8477112d6c9c
|
|
BLAKE2b-256 checksum How to use checksums |
17990a298054f413c8da2c14d226b09bc8d990c811edfd93bb81e584d3699140
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp312-cp312-macosx_11_0_arm64.whl
| Download URL | helios_network-0.10.4-cp312-cp312-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.5 kB |
| Tags | CPython 3.12 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3222987523127529acc2375a68e910e4084c4f179b5eae232dfb244fc76fcb67
|
|
BLAKE2b-256 checksum How to use checksums |
13a1cbf465db23cf06d84d1a2705d5ddca711f74d36c3b073006feead1d44299
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp311-cp311-win_amd64.whl
| Download URL | helios_network-0.10.4-cp311-cp311-win_amd64.whl |
|---|---|
| Size | 503.8 kB |
| Tags | CPython 3.11 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7ac6a859c294ac3aaae846f37f076aacff9e24b741578c7bedbc10f5b6213d83
|
|
BLAKE2b-256 checksum How to use checksums |
753096460a56c90449681b7b5f791bf10e1898a519b65da0c0f4b49ec44ead33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | helios_network-0.10.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 366.8 kB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
41d13037af8f3722128c4eda287a8af393a265a7064f4652ada894f59517923c
|
|
BLAKE2b-256 checksum How to use checksums |
49d0ebc24d046bb9e007a76d3f755e136c23ef0b9b6aa34400aa2fd04168540a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp311-cp311-macosx_11_0_arm64.whl
| Download URL | helios_network-0.10.4-cp311-cp311-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.7 kB |
| Tags | CPython 3.11 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
28af3dd9a5393cbdba8c61f4bf109ce15d3f309a3930b5b4b7776218c2e63861
|
|
BLAKE2b-256 checksum How to use checksums |
7384398d9d0ac79c69af494f11307bf59c9b6db9d61fe19e05a2c7e903c9b138
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp310-cp310-win_amd64.whl
| Download URL | helios_network-0.10.4-cp310-cp310-win_amd64.whl |
|---|---|
| Size | 503.8 kB |
| Tags | CPython 3.10 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
13da043aacd2b160a983ee879ec17211dda9c71a44ebb6a1ce61d689be9fd044
|
|
BLAKE2b-256 checksum How to use checksums |
dd439a30c1b9865425327cb6998fdbc52ed78bbe4c27660fb61e12e8532c816d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | helios_network-0.10.4-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 366.8 kB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
490ba4763bc2d3b29c8cc45acae033381b00c909d038cd446222d97528a5d419
|
|
BLAKE2b-256 checksum How to use checksums |
6e1a3ba452c4e34f6032c7295ec5e0c696468d098f2fa29b895a4982518e6957
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp310-cp310-macosx_11_0_arm64.whl
| Download URL | helios_network-0.10.4-cp310-cp310-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.7 kB |
| Tags | CPython 3.10 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
218c6e74a3fe0fab282dde376b86c5912844d5fbadc2158e3d2b7e4f5ce53ac0
|
|
BLAKE2b-256 checksum How to use checksums |
e318db26842f831b8cdaaa32314ebd5757b0df787a5ba0acc7444e4cfff1323a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp39-cp39-win_amd64.whl
| Download URL | helios_network-0.10.4-cp39-cp39-win_amd64.whl |
|---|---|
| Size | 504.5 kB |
| Tags | CPython 3.9 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
319d61febf7ada305ce4fa62baeb27428445df608f037711f0728501d33657d6
|
|
BLAKE2b-256 checksum How to use checksums |
5f872effcdf4eaa8ea09261c1a2867c33f1b004e9b7c8cee54fafda5bd089edd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl
| Download URL | helios_network-0.10.4-cp39-cp39-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl |
|---|---|
| Size | 366.8 kB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
6f5d147f84fdb5cdc165367f927b202fdd19be361f3542c40b70af2f4f853793
|
|
BLAKE2b-256 checksum How to use checksums |
2fbb6ff62651278cb92a7e3d5f3c708f7f29c4adc831d7a5d9d95dd5dbee93c0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency logRelease files / helios_network-0.10.4-cp39-cp39-macosx_11_0_arm64.whl
| Download URL | helios_network-0.10.4-cp39-cp39-macosx_11_0_arm64.whl |
|---|---|
| Size | 278.7 kB |
| Tags | CPython 3.9 macOS 11.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
e10bf1c3bfe64cfb55dd06a0bf6a60dd1f57390a829dcc3b171d379649a96e14
|
|
BLAKE2b-256 checksum How to use checksums |
d337aed22dedd50738844542b784244d7d0e94d0461bb8f55bc75fb7eb115007
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.12
|
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 9, 2026.
Transparency log