Skip to main content

NetWeaveX

PyPI version Python versions License

NetWeaveX is a Python library for building, analyzing, and storing graphs and networks.

import netweavex as nx

G = nx.Graph()
G.add_edge("A", "B", weight=4)
G.add_edge("B", "D", weight=2)
G.add_edge("A", "C", weight=3)
G.add_edge("C", "D", weight=4)

print(nx.shortest_path(G, "A", "D", weight="weight"))
# ['A', 'B', 'D']

Installation

pip install netweavex

Python 3.12 or newer is required. Python 3.14.1 is not supported.

The base install has no required third-party dependencies. Install the scientific extras when you want arrays, matrices, data frames, or drawing:

pip install "netweavex[default]"
Extra Includes
default NumPy, SciPy, Matplotlib, pandas
extra lxml, PyGraphviz, pydot, SymPy
test pytest

What you can do

  • Build undirected, directed, and multigraphs, including views and subgraphs.
  • Generate classic, random, lattice, tree, and community graphs.
  • Run shortest paths, centrality, clustering, components, flows, matching, isomorphism, and community detection.
  • Read and write GraphML, GEXF, GML, edge lists, adjacency lists, and JSON.
  • Draw graphs when Matplotlib, Graphviz, or pydot is installed.

Quick start

import netweavex as nx

G = nx.karate_club_graph()

print(G.number_of_nodes(), G.number_of_edges())
print(nx.density(G))
print(sorted(nx.degree_centrality(G), key=nx.degree_centrality(G).get, reverse=True)[:5])

nx.write_graphml(G, "karate.graphml")
H = nx.read_graphml("karate.graphml")

Directed graphs use nx.DiGraph. Multiple edges between the same nodes use nx.MultiGraph or nx.MultiDiGraph.

D = nx.DiGraph([(1, 2), (2, 3), (3, 1)])
print(nx.is_strongly_connected(D))

License

NetWeaveX is released under the 3-clause BSD license. See LICENSE.txt.

Metadata

Release files for netweavex 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for netweavex 1.1.1
File Size Uploaded Provenance
netweavex-1.1.1.tar.gz 1.9 MB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for netweavex 1.1.1
File Interpreter ABI Platform
netweavex-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 MB

Release files / netweavex-1.1.1.tar.gz

Download URL netweavex-1.1.1.tar.gz
Size 1.9 MB
Tags Source
SHA-256 checksum
How to use checksums
6127dd3aafdd10fd878b10f26c0fe3bf76c8589ec1e976eb69d6ca7615200ee5
BLAKE2b-256 checksum
How to use checksums
dd28d9687e4010b83081d5c331423b9ab501eee00ea6aa11190950a98d633d5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Release files / netweavex-1.1.1-py3-none-any.whl

Download URL netweavex-1.1.1-py3-none-any.whl
Size 2.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
a938337846662c9c1cadffb2209fd4c65c651e236d8855e555dc3461bbaad1db
BLAKE2b-256 checksum
How to use checksums
2e73ea74a65e7ed52df612ba25f0aa2a356aef4d6f204343cbd2d73441c9f0f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.5

Security for netweavex 1.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.

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page