{"id":24508475,"url":"https://github.com/aplbrain/grandlite","last_synced_at":"2026-05-11T09:26:55.290Z","repository":{"id":165684577,"uuid":"641090259","full_name":"aplbrain/grandlite","owner":"aplbrain","description":"A SQLite-like tool for querying graphs from the command-line using graph query languages in in-memory Python.","archived":false,"fork":false,"pushed_at":"2023-10-18T22:43:15.000Z","size":77,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-05-16T01:13:37.403Z","etag":null,"topics":["aplbrain","command-line","cypher","dotmotif","grand-graph","graph","graph-database","graph-query","graphs","in-memory","neo4j","opencypher","sqlite"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aplbrain.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-15T18:58:15.000Z","updated_at":"2024-05-30T04:55:23.692Z","dependencies_parsed_at":null,"dependency_job_id":"955b5d16-878c-42cc-ab50-73c26e62faea","html_url":"https://github.com/aplbrain/grandlite","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aplbrain%2Fgrandlite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aplbrain%2Fgrandlite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aplbrain%2Fgrandlite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aplbrain%2Fgrandlite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aplbrain","download_url":"https://codeload.github.com/aplbrain/grandlite/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243707942,"owners_count":20334733,"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":["aplbrain","command-line","cypher","dotmotif","grand-graph","graph","graph-database","graph-query","graphs","in-memory","neo4j","opencypher","sqlite"],"created_at":"2025-01-22T00:16:30.383Z","updated_at":"2026-05-11T09:26:50.265Z","avatar_url":"https://github.com/aplbrain.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# grandlite\n\nA SQLite-like tool for querying graphs from the command-line using graph query languages in in-memory Python.\n\nSupports out-of-core graphs with [Grand](https://github.com/aplbrain/grand).\n\n## Installation\n\n```bash\n$ pip install grandlite\n```\n\n## Usage\n\n### Get stats about a graph\n\n```bash\n$ poetry run grandlite --stats 'h-edgelist(pre:post)://white_1986_n2u.csv'\n```\n\n```\nNodes: 221\nEdges: 1855\nDensity: 0.038153023447141096\nOrphans: 0\nLeaves: 7\nMax degree: 44\nMax node: RIMR\nSelf-loops: 52\n```\n\n### Run an interactive Cypher session\n\n```bash\n$ grandlite my-graph.graphml\n```\n\n```cypher\n\u003e match (a)-[]-\u003e(b) return a,b limit 3\n\n        a       b\n0  023620  364605\n1  023620  438847\n2  023620  462336\n\n\u003e save results.json\n\n\u003e exit()\n```\n\nNote that `save [filename]` will output `csv`, `json`, and `jsonl` files, depending on the extension provided; or will default to `results-XXXX.json` with XXX as a timestamp in ISO format, if no filename is provided.\n\nFor more information about saving, see [the docs](./docs/Saving.md).\n\n## Command-line options\n\n```\n$ grandlite --help\nusage: An interactive graph query tool for Cypher and other query languages.\n       [-h]\n       [-o {csv,json,jsonl}]\n       [-q QUERY]\n       [-l {cypher,dotmotif}]\n       [--stats]\n       [--convert OUTPUT_FILENAME]\n       graph\n\npositional arguments:\n  graph                 The filename of the graph to load.\n\noptions:\n  -h, --help            show this help message and exit\n  -o {csv,json,jsonl}, --output {csv,json,jsonl}\n                        The output format to use.\n  -q QUERY, --query QUERY\n                        If not provided, enters an interactive prompt.\n  -l {cypher,dotmotif}, --language {cypher,dotmotif}\n                        The query language to use (default: cypher).\n  --stats               Print statistics about the graph and exit.\n  --convert OUTPUT_FILENAME\n                        Convert the graph to a new format, save to the\n                        output filename specified, and exit.\n```\n\n## Input formats\n\nGrandlite supports a growing variety of input formats. For a complete list, see [the docs](./docs/Input-Formats.md).\n\n### Examples\n\n#### OpenCypher\n\n```bash\n$ grandlite 'vertex:vertices.csv;edge:edges.csv'\n```\n\n#### CSV / Edgelist with or without headers\n\n```bash\n$ grandlite 'h-edgelist(pre:post)://white_1986_n2u.csv'\n```\n\n---\n\n\u003cp align='center'\u003e\u003csmall\u003eMade with 💙 at \u003ca href='http://www.jhuapl.edu/'\u003e\u003cimg alt='JHU APL' align='center' src='https://user-images.githubusercontent.com/693511/62956859-a967ca00-bdc1-11e9-998e-3888e8a24e86.png' height='42px'\u003e\u003c/a\u003e\u003c/small\u003e\u003c/p\u003e\n\n---\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplbrain%2Fgrandlite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faplbrain%2Fgrandlite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faplbrain%2Fgrandlite/lists"}