Open-source foundationPython · RustPyPI

Nodes, edges, attributes — and no further assumptions.

GraphRecords holds entities and their relationships. The library knows no domain: what a node means is your model's decision. The medical layer MedRecord is one application of it, not a precondition.

Structure

A network with no centre.

No node type is privileged and no direction is imposed. The example below shows research literature and its concepts — the same structure carries any other domain. Point at a node to see its relationships.

PublicationConceptPersonInstitution

Four node types — publication, concept, person, institution — joined by relationships such as cites, covers, written by and affiliated with. The library knows none of these types; all four are definitions in the model.

Schematic view. Node and edge types are yours to define.

How it is built

Rust underneath, Python in front.

The core is written in Rust and manages memory and traversal. On top sits a Python interface that feels like an ordinary library. Working in Python gets you Rust runtime without writing Rust.

Core

Rust

Memory management without a garbage collector, concurrent traversal, no runtime surprises on large holdings.

Interface

Python

A typed API with familiar idioms, compatible with the usual analysis tooling of day-to-day data science.

Runtime

In memory

Millions of nodes and edges on one machine. No database server, no cluster, no network connection required.

Dependencies

Few

A slim dependency list keeps your IT review short and the installation reproducible.

Installation

One command.

The package is on PyPI, with pre-built wheels for Linux, macOS and Windows. A Rust toolchain is not required to install it.

Python 3.10+Linux · macOS · WindowsNo Rust toolchain
TerminalPyPI
pip install graphrecords
pip install medrecords # the medical layer
Contributing

Developed in the open.

Development, discussion and planning happen in the repository. Bug reports and contributions are welcome, including from outside medicine — the library is meant to stay domain-agnostic.

On top

For medical data: MedRecord.

MedRecord builds on GraphRecords and brings what medicine requires: entity types for diagnoses, procedures, medications and lab values, plus catalogues with versions.

Go to the MedRecord page