{"id":14959422,"url":"https://github.com/pometry/raphtory","last_synced_at":"2025-04-08T08:16:42.837Z","repository":{"id":37085600,"uuid":"92834468","full_name":"Pometry/Raphtory","owner":"Pometry","description":"Scalable graph analytics database powered by a multithreaded, vectorized temporal engine, written in Rust","archived":false,"fork":false,"pushed_at":"2025-01-10T15:06:26.000Z","size":149678,"stargazers_count":359,"open_issues_count":104,"forks_count":55,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-01-13T06:20:52.776Z","etag":null,"topics":["analytics","database","embedded-database","graph","graph-database","neo4j","olap","python","rust","temporal","time-series"],"latest_commit_sha":null,"homepage":"https://raphtory.com","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pometry.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-05-30T13:15:18.000Z","updated_at":"2025-01-08T10:24:15.000Z","dependencies_parsed_at":"2023-09-28T21:29:39.322Z","dependency_job_id":"8e180afd-03eb-4607-8d3a-968c38f5e421","html_url":"https://github.com/Pometry/Raphtory","commit_stats":{"total_commits":1409,"total_committers":36,"mean_commits":"39.138888888888886","dds":0.8119233498935415,"last_synced_commit":"159600b8a720a9b3b5e4e7f864b83bbcd171a67a"},"previous_names":["raphtory/raphtory"],"tags_count":54,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pometry%2FRaphtory","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pometry%2FRaphtory/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pometry%2FRaphtory/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pometry%2FRaphtory/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pometry","download_url":"https://codeload.github.com/Pometry/Raphtory/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247801175,"owners_count":20998339,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["analytics","database","embedded-database","graph","graph-database","neo4j","olap","python","rust","temporal","time-series"],"created_at":"2024-09-24T13:19:40.977Z","updated_at":"2025-04-08T08:16:42.827Z","avatar_url":"https://github.com/Pometry.png","language":"HTML","readme":"\u003cbr\u003e\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/6665739/130641943-fa7fcdb8-a0e7-4aa4-863f-3df61b5de775.png\" alt=\"Raphtory\" height=\"100\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://github.com/Raphtory/Raphtory/actions/workflows/test.yml/badge.svg\"\u003e\n\u003cimg alt=\"Test and Build\" src=\"https://github.com/Raphtory/Raphtory/actions/workflows/test.yml/badge.svg\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/Raphtory/Raphtory/releases\"\u003e\n\u003cimg alt=\"Latest Release\" src=\"https://img.shields.io/github/v/release/Raphtory/Raphtory?color=brightgreen\u0026include_prereleases\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://github.com/Raphtory/Raphtory/issues\"\u003e\n\u003cimg alt=\"Issues\" src=\"https://img.shields.io/github/issues/Raphtory/Raphtory?color=brightgreen\" /\u003e\n\u003c/a\u003e\n\u003ca href=\"https://crates.io/crates/raphtory\"\u003e\n\u003cimg alt=\"Crates.io\" src=\"https://img.shields.io/crates/v/raphtory\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/raphtory/\"\u003e\n\u003cimg alt=\"PyPI\" src=\"https://img.shields.io/pypi/v/raphtory\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://pypi.org/project/raphtory/#history\"\u003e\n\u003cimg alt=\"PyPI Downloads\" src=\"https://img.shields.io/pypi/dm/raphtory.svg\"\u003e\n\u003c/a\u003e\n\u003ca href=\"https://mybinder.org/v2/gh/Raphtory/Raphtory/master?labpath=examples%2Fpy%2Flotr%2Flotr.ipynb\"\u003e\n\u003cimg alt=\"Launch Notebook\" src=\"https://mybinder.org/badge_logo.svg\" /\u003e\n\u003c/a\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n\u003ca href=\"https://www.raphtory.com\"\u003e🌍 Website \u003c/a\u003e\n\u0026nbsp\n\u003ca href=\"https://docs.raphtory.com/\"\u003e📒 Documentation\u003c/a\u003e\n\u0026nbsp \n\u003ca href=\"https://www.pometry.com\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/6665739/202438989-2859f8b8-30fb-4402-820a-563049e1fdb3.png\" height=\"20\" align=\"center\"/\u003e Pometry\u003c/a\u003e \n\u0026nbsp\n\u003ca href=\"https://www.raphtory.com/user-guide/installation/\"\u003e🧙Tutorial\u003c/a\u003e \n\u0026nbsp\n\u003ca href=\"https://github.com/Raphtory/Raphtory/issues\"\u003e🐛 Report a Bug\u003c/a\u003e \n\u0026nbsp\n\u003ca href=\"https://join.slack.com/t/raphtory/shared_invite/zt-xbebws9j-VgPIFRleJFJBwmpf81tvxA\"\u003e\u003cimg src=\"https://user-images.githubusercontent.com/6665739/154071628-a55fb5f9-6994-4dcf-be03-401afc7d9ee0.png\" height=\"20\" align=\"center\"/\u003e Join Slack\u003c/a\u003e \n\u003c/p\u003e\n\n\u003cbr\u003e\n\nRaphtory 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\non your laptop, and can be dropped into your existing pipelines with a simple `pip install raphtory`.\n\nIt can be ran embedded or as a server instance using GraphQL, supports time traveling, full-text search, multilayer modelling, and advanced analytics beyond simple querying like automatic risk detection, dynamic scoring, and temporal motifs. With the subscription model, Raphtory also supports out-of-memory (on-disk) scaling with no performance loss!\n\nIf you wish to contribute, check out the open [list of issues](https://github.com/Pometry/Raphtory/issues), [bounty board](https://github.com/Raphtory/Raphtory/discussions/categories/bounty-board) or hit us up directly on [slack](https://join.slack.com/t/raphtory/shared_invite/zt-xbebws9j-VgPIFRleJFJBwmpf81tvxA). Successful contributions will be reward with swizzling swag!\n\n## Installing Raphtory\n\nRaphtory is available for Python and Rust.\n\nFor python you must be using version 3.8 or higher and can install via pip:\n```bash\npip install raphtory\n``` \nFor Rust, Raphtory is hosted on [crates](https://crates.io/crates/raphtory) for Rust version 1.77 or higher and can be included in your project via `cargo add`:\n```bash\ncargo add raphtory\n```\n\n## Running a basic example\nBelow 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](https://www.raphtory.com/user-guide/ingestion/1_creating-a-graph/).\n```python\nfrom raphtory import Graph\nfrom raphtory import algorithms as algo\nimport pandas as pd\n\n# Create a new graph\ngraph = Graph()\n\n# Add some data to your graph\ngraph.add_node(timestamp=1, id=\"Alice\")\ngraph.add_node(timestamp=1, id=\"Bob\")\ngraph.add_node(timestamp=1, id=\"Charlie\")\ngraph.add_edge(timestamp=2, src=\"Bob\", dst=\"Charlie\", properties={\"weight\": 5.0})\ngraph.add_edge(timestamp=3, src=\"Alice\", dst=\"Bob\", properties={\"weight\": 10.0})\ngraph.add_edge(timestamp=3, src=\"Bob\", dst=\"Charlie\", properties={\"weight\": -15.0})\n\n# Check the number of unique nodes/edges in the graph and earliest/latest time seen.\nprint(graph)\n\nresults = [[\"earliest_time\", \"name\", \"out_degree\", \"in_degree\"]]\n\n# Collect some simple node metrics Ran across the history of your graph with a rolling window\nfor graph_view in graph.rolling(window=1):\n    for v in graph_view.nodes:\n        results.append(\n            [graph_view.earliest_time, v.name, v.out_degree(), v.in_degree()]\n        )\n\n# Print the results\nprint(pd.DataFrame(results[1:], columns=results[0]))\n\n# Grab an edge, explore the history of its 'weight'\ncb_edge = graph.edge(\"Bob\", \"Charlie\")\nweight_history = cb_edge.properties.temporal.get(\"weight\").items()\nprint(\n    \"The edge between Bob and Charlie has the following weight history:\", weight_history\n)\n\n# Compare this weight between time 2 and time 3\nweight_change = cb_edge.at(2)[\"weight\"] - cb_edge.at(3)[\"weight\"]\nprint(\n    \"The weight of the edge between Bob and Charlie has changed by\",\n    weight_change,\n    \"pts\",\n)\n\n# Run pagerank and ask for the top ranked node\ntop_node = algo.pagerank(graph).top_k(5).max_item()\nprint(\n    \"The most important node in the graph is\",\n    top_node[0].name,\n    \"with a score of\",\n    top_node[1],\n)\n```\n### Output:\n```a\nGraph(number_of_edges=2, number_of_nodes=3, earliest_time=1, latest_time=3)\n\n|   | earliest_time | name    | out_degree | in_degree |\n|---|---------------|---------|------------|-----------|\n| 0 | 1             | Alice   | 0          | 0         |\n| 1 | 1             | Bob     | 0          | 0         |\n| 2 | 1             | Charlie | 0          | 0         |\n| 3 | 2             | Bob     | 1          | 0         |\n| 4 | 2             | Charlie | 0          | 1         |\n| 5 | 3             | Alice   | 1          | 0         |\n| 6 | 3             | Bob     | 1          | 1         |\n| 7 | 3             | Charlie | 0          | 1         |\n\nThe edge between Bob and Charlie has the following weight history: [(2, 5.0), (3, -15.0)]\n\nThe weight of the edge between Bob and Charlie has changed by 20.0 pts\n\nThe top node in the graph is Charlie with a score of 0.4744116163405977\n```\n\n## GraphQL\n\nAs 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.\n\nBelow 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.\n\n```python\nfrom raphtory import Graph\nfrom raphtory.graphql import GraphServer\nimport pandas as pd\nimport os\n\n# URL for lord of the rings data from our main tutorial\nurl = \"https://raw.githubusercontent.com/Raphtory/Data/main/lotr-with-header.csv\"\ndf = pd.read_csv(url)\n\n# Load the lord of the rings graph from the dataframe\ngraph = Graph()\ngraph.load_edges_from_pandas(df,\"time\",\"src_id\",\"dst_id\")\n\n#Create a working_dir for your server and save your graph into it \n#You can save any number of graphs here or create them via the server ones its running\nos.makedirs(\"graphs/\", exist_ok=True)\ngraph.save_to_file(\"graphs/lotr_graph\")\n\n# Launch the server and get a client to it.\nserver = GraphServer(work_dir=\"graphs/\").start()\nclient = server.get_client()\n\n#Run a basic query to get the names of the characters + their degree\nresults = client.query(\"\"\"{\n             graph(path: \"lotr_graph\") {\n                 nodes {\n                    list{\n                        name\n                        degree\n                       }   \n                    }\n                 }\n             }\"\"\")\n\nprint(results)\n```\n\n### Output:\n```bash\nLoading edges: 100%|██████████████| 2.65K/2.65K [00:00\u003c00:00, 984Kit/s]\nPlayground: http://localhost:1736\n{'graph': \n    {'nodes': \n        [{'name': 'Gandalf', 'degree': 49}, \n         {'name': 'Elrond', 'degree': 32}, \n         {'name': 'Frodo', 'degree': 51}, \n         {'name': 'Bilbo', 'degree': 21}, \n         ...\n        ]\n    }\n}\n```\n### GraphQL Playground\nWhen 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.\n\n![GraphQL Playground](https://i.imgur.com/p0HH6v3.png)\n\n### Graph Visualisation and Explorations\nOnce 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.\n\n![Graph User Interface](https://github.com/user-attachments/assets/65aec644-edf8-4db6-a932-5b63228e9e0d)\n\n\n## Getting started\nTo get you up and running with Raphtory we provide a full set of tutorials on the [Raphtory website](https://raphtory.com):\n\n* [Getting Data into Raphtory](https://www.raphtory.com/user-guide/ingestion/1_creating-a-graph/)\n* [Basic Graph Queries](https://www.raphtory.com/user-guide/querying/1_intro/)\n* [Time Travelling and Graph views](https://www.raphtory.com/user-guide/views/1_intro/)\n* [Running algorithms](https://www.raphtory.com/user-guide/algorithms/1_intro/)\n* [Integrating with other tools](https://www.raphtory.com/user-guide/export/1_intro/)\n\nIf API documentation is more your thing, you can dive straight in [here](https://docs.raphtory.com/)!\n\n## Community\n\nJoin the growing community of open-source enthusiasts using Raphtory to power their graph analysis!\n\n- Follow [![Slack](https://img.shields.io/twitter/follow/raphtory?label=@raphtory)](https://twitter.com/raphtory) for the latest Raphtory news and development\n\n- Join our [![Slack](https://img.shields.io/badge/community-Slack-red)](https://join.slack.com/t/raphtory/shared_invite/zt-xbebws9j-VgPIFRleJFJBwmpf81tvxA) to chat with us and get answers to your questions!\n\n### Contributors\n\n\u003ca href=\"https://github.com/raphtory/raphtory/graphs/contributors\"\u003e\u003cimg src=\"https://contrib.rocks/image?repo=raphtory/raphtory\"/\u003e\u003c/a\u003e\n\n### Bounty board\n\nRaphtory is currently offering rewards for contributions, such as new features or algorithms. Contributors will receive swag and prizes!\n\nTo get started, check out our list of [desired algorithms](https://github.com/Raphtory/Raphtory/discussions/categories/bounty-board) which include some low hanging fruit (🍇) that are easy to implement.\n\n\n## Benchmarks\n\nWe host a page which triggers and saves the result of two benchmarks upon every push to the master branch.  View this [here](https://pometry.github.io/Raphtory/dev/bench/)\n\n## License\n\nRaphtory is licensed under the terms of the GNU General Public License v3.0 (check out our LICENSE file).\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpometry%2Fraphtory","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpometry%2Fraphtory","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpometry%2Fraphtory/lists"}