Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Raphtory is an in-memory vectorised graph database written in Rust with friendly Python APIs on top. It is blazingly fast, scales to hundreds of millions of edges
on your laptop, and can be dropped into your existing pipelines with a simple pip install raphtory
.
It supports time traveling, full-text search, multilayer modelling, and advanced analytics beyond simple querying like automatic risk detection, dynamic scoring, and temporal motifs.
If you wish to contribute, check out the open list of issues, bounty board or hit us up directly on slack. Successful contributions will be reward with swizzling swag!
Installing Raphtory
Raphtory is available for Python and Rust.
For python you must be using version 3.8 or higher and can install via pip:
For Rust, Raphtory is hosted on crates for Rust version 1.77 or higher and can be included in your project via cargo add
:
Running a basic example
Below is a small example of how Raphtory looks and feels when using our Python APIs. If you like what you see, you can dive into a full tutorial here.
# Create a new graph
=
# Add some data to your graph
# Check the number of unique nodes/edges in the graph and earliest/latest time seen.
=
# Collect some simple node metrics Ran across the history of your graph with a rolling window
# Print the results
# Grab an edge, explore the history of its 'weight'
=
=
# Compare this weight between time 2 and time 3
= -
# Run pagerank and ask for the top ranked node
=
Output:
Graph(number_of_edges=2, number_of_nodes=3, earliest_time=1, latest_time=3)
| | earliest_time | name | out_degree | in_degree |
|---|---------------|---------|------------|-----------|
| 0 | 1 | Alice | 0 | 0 |
| 1 | 1 | Bob | 0 | 0 |
| 2 | 1 | Charlie | 0 | 0 |
| 3 | 2 | Bob | 1 | 0 |
| 4 | 2 | Charlie | 0 | 1 |
| 5 | 3 | Alice | 1 | 0 |
| 6 | 3 | Bob | 1 | 1 |
| 7 | 3 | Charlie | 0 | 1 |
The edge between Bob and Charlie has the following weight history: [(2, 5.0), (3, -15.0)]
The weight of the edge between Bob and Charlie has changed by 20.0 pts
The top node in the graph is Charlie with a score of 0.4744116163405977
GraphQL
As part of the python APIs you can host your data within Raphtory's GraphQL server. This makes it super easy to integrate your graphy analytics with web applications.
Below is a small example creating a graph, running a server hosting this data, querying it with our GraphQL client, or visualising your data in the UI.
# URL for lord of the rings data from our main tutorial
=
=
# Load the lord of the rings graph from the dataframe
=
#Create a working_dir for your server and save your graph into it
#You can save any number of graphs here or create them via the server ones its running
# Launch the server and get a client to it.
=
=
#Run a basic query to get the names of the characters + their degree
=
Output:
||
}
}
}
}
}
}
GraphQL Playground
When you host a Raphtory GraphQL server you get a web playground bundled in, accessible on the same port within your browser (defaulting to 1736). Here you can experiment with queries on your graphs and explore the schema. An example of the playground can be seen below, running the same query as in the python example above.
Graph Visualisation and Explorations
Once the GraphQL server is running, you can access the UI directly. If the server is hosted on port 1736, the UI will be available at http://localhost:1736. The UI allows you to search for data in Raphtory, explore connections, and visualise the graph effortlessly.
Getting started
To get you up and running with Raphtory we provide a full set of tutorials on the Raphtory website:
- Getting Data into Raphtory
- Basic Graph Queries
- Time Travelling and Graph views
- Running algorithms
- Integrating with other tools
If API documentation is more your thing, you can dive straight in here!
Online notebook sandbox
Want to give this a go, but can't install? Check out Raphtory in action with our interactive Jupyter Notebooks! Just click the badge below to launch a Raphtory sandbox online, no installation needed.
Community
Join the growing community of open-source enthusiasts using Raphtory to power their graph analysis!
Contributors
Bounty board
Raphtory is currently offering rewards for contributions, such as new features or algorithms. Contributors will receive swag and prizes!
To get started, check out our list of desired algorithms which include some low hanging fruit (🍇) that are easy to implement.
Benchmarks
We host a page which triggers and saves the result of two benchmarks upon every push to the master branch. View this here
License
Raphtory is licensed under the terms of the GNU General Public License v3.0 (check out our LICENSE file).