48 pages · about 25,000 words
The guide.
The project's README, split into pages you can read, link and search one at a time: installing and switching, how a call reaches Rust, how parity and speed are checked, running it in production, and the full reference.
Start here
What it is, how to switch, and when it's the right tool.NetworkX is the canonical Python graph library: rich, correct, comprehensive, and slow on anything that isn't toy-sized. Its pure-Python adjacency, Python-level inner loops, and per-call dict bookkeeping turn graph analytics over even modes
Start here3 minWhy a Port, Not a Wrapper?There are several existing approaches to "faster NetworkX." Each has tradeoffs the FrankenNetworkX design rejects.
Start here1 minTwo Ways to Use ItReplace networkx with franken_networkx at the import line:
Start here1 minQuick StartStart here1 minTutorial: A Complete Graph AnalysisA walkthrough that goes from raw data to insight using only fnx, demonstrating the end-to-end loop a real user would follow.
Start here2 minCookbookEvery fnx function accepts an nx.Graph (or fnx graph) interchangeably; the boundary coerces:
Start here1 minWhen to Use FrankenNetworkX (and When Not To)Use it when:
Start here1 minMigration From NetworkX: PatternsA reference catalog of common NetworkX patterns and their fnx equivalents. The migration is almost always trivial; the patterns below cover the edge cases that aren't.
Start here4 minFAQIs it really a drop-in replacement? Across the pinned 3.6.1 declared import-and-signature FeatureUniverse, all 4,129 applicable paths are strictly present (100.0%), with 0 partial and 0 missing. The 476 algorithms in backend.py are the disp
How it works
From the Python call to the Rust kernel and back.Five durable principles govern every commit:
How it works1 minGraph TypesAll four provide the core method surface (add_node, add_edge, remove_node, subgraph, copy, to_directed, to_undirected, edges, nodes, degree, adj, __getitem__, etc.). Exact class/member signature differences are classified as partial in the
How it works2 minArchitectureHow it works6 minCanonical Graph Semantics Engine (CGSE)CGSE is the project's core correctness mechanism. It treats algorithmic tie-breaking as part of the API contract rather than incidental behavior.
How it works1 minHow a Call Flows Through the SystemTracing a natively routed call from the Python call site down to native code and back. The boxes name pagerank for concreteness; note that the public pagerank route today runs its power iteration in scipy over a natively built CSR (see the
How it works2 minNetworkX Backend Protocol PrimerNetworkX 3.0+ ships a backend protocol that lets third-party libraries accelerate or replace algorithm implementations. FrankenNetworkX implements it through two Python entry points wired up in pyproject.toml:
How it works7 minAlgorithm Implementation NotesThe native algorithm implementations in fnx-algorithms favor textbook complexity bounds. CGSE registers policies and optional witness collection for twelve reference algorithms; instrumentation does not yet cover every public route. The not
How it works3 minInternals WalkthroughA guided tour of the moving parts in a single algorithm execution. Useful for new contributors and for anyone debugging an edge case.
How it works1 minWorking With AttributesNetworkX's killer feature is arbitrary edge / node / graph attributes. fnx preserves that contract exactly. A few patterns worth knowing.
How it works5 minMemory Model and Data LayoutUnderstanding the internals helps when you want to reason about cost or attribute semantics.
Evidence
How parity, speed and safety are checked, and what the checks cover.FrankenNetworkX's compatibility contract is not "best-effort similarity." It is a machine-checked guarantee policed by five auto-generated audit ledgers under docs/:
Evidence1 minSecurity DoctrineThe project defends against:
Evidence1 minDurability: RaptorQ EverywhereLong-lived artifacts emit RaptorQ erasure-coded sidecars and decode-proof receipts. This applies to:
Evidence2 minThe Audit-Ledger SystemThe five ledgers under docs/ are generated by scripts under scripts/, not written by hand. coverage.md is regenerated and compared on every DSR quality run (via scripts/verify_docs.py), so drift there fails the gate; the other four are rege
Evidence2 minQuality GatesThe only quality, build and release authority for this repository is DSR (Doodlestein Self-Releaser): dsr quality --tool franken_networkx, dsr build franken_networkx, dsr release franken_networkx <version>. The GitHub Actions workflows unde
Evidence3 minTestingThe Python parity suite (pytest tests/python/) is the canonical truth. It is organized by parity flavor:
Evidence19 minPerformanceThe performance doctrine in AGENTS.md is profile-first:
Evidence1 minObservabilityFor long-running pipelines, the witness ledger and decision log are the canonical observability surface:
Evidence1 minThreat ModelThe security doctrine in AGENTS.md covers four threat surfaces:
In production
Deploying it, debugging it, and writing code that runs on either library.If you're working in a third-party library that hands you nx.Graph instances, the easiest path is:
In production1 minDevelopmentABI3 builds a single wheel that works on Python 3.10, 3.11, 3.12, and 3.13; no per-version matrix is needed.
In production1 minTroubleshootingTop issues and their fixes.
In production1 minEnvironment VariablesStandard Rust / Python build-time and runtime variables that are useful when working with FrankenNetworkX:
In production1 minReproducibility RecipeBit-for-bit reproducible graph analytics with fnx. The recipe below is usable as the spine of a regression-locked pipeline.
In production2 minProduction Deployment NotesA practical checklist for shipping fnx in production.
In production1 minStyle Guide for Code That Uses fnxHow to write code that flips cleanly between fnx and nx without surprises.
In production2 minReal-World Use CasesA non-exhaustive list of problems fnx fits well, drawn from the project's design rationale.
In production5 minCommon PitfallsPitfalls real users have hit, in roughly descending order of frequency.
Reference
Catalogues, limits, the roadmap and the reading list.FrankenNetworkX implements paths across 25+ algorithm families. The table below is a high-level inventory. The canonical, machine-checked surface list lives in docs/coverage.md (4,926 qualified NetworkX 3.6.1 FeatureUniverse rows, including
Reference1 minExamplesReference1 minDocumentationReference1 minLimitationsFrankenNetworkX is honest about what it does not do today:
Reference3 minCitations and Algorithm ReferencesThe algorithm implementations and design decisions trace to a specific body of literature. Treat this as a reading list more than a complete bibliography.
Reference1 minRoadmapIn rough priority order (bv --robot-triage shows the current bead backlog):
Reference2 minGlossaryReference1 minReferences and InspirationReference1 minProject LayoutReference1 minAbout Contributions> Please don't take this the wrong way, but I do not accept outside contributions for any of my projects. I simply don't have the mental bandwidth to review anything, and it's my name on the thing, so I'm responsible for any problems it cau
Reference1 minLicenseMIT. See LICENSE.