grandlite
A SQLite-like tool for querying graphs from the command-line using graph query languages in in-memory Python.
Supports out-of-core graphs with Grand.
Installation
$ pip install grandlite
Usage
Get stats about a graph
$ uv run grandlite --stats 'h-edgelist(pre:post)://white_1986_n2u.csv'
Nodes: 221
Edges: 1855
Density: 0.038153023447141096
Orphans: 0
Leaves: 7
Max degree: 44
Max node: RIMR
Self-loops: 52
Run an interactive Cypher session
$ grandlite my-graph.graphml
> match (a)-[]->(b) return a,b limit 3
a b
0 023620 364605
1 023620 438847
2 023620 462336
> save results.json
> exit()
Note 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.
For more information about saving, see the docs.
Command-line options
$ grandlite --help
usage: An interactive graph query tool for Cypher and other query languages.
[-h]
[-o {csv,json,jsonl}]
[-q QUERY]
[-l {cypher,dotmotif}]
[--stats]
[--convert OUTPUT_FILENAME]
graph
positional arguments:
graph The filename of the graph to load.
options:
-h, --help show this help message and exit
-o {csv,json,jsonl}, --output {csv,json,jsonl}
The output format to use.
-q QUERY, --query QUERY
If not provided, enters an interactive prompt.
-l {cypher,dotmotif}, --language {cypher,dotmotif}
The query language to use (default: cypher).
--stats Print statistics about the graph and exit.
--convert OUTPUT_FILENAME
Convert the graph to a new format, save to the
output filename specified, and exit.
Input formats
Grandlite supports a growing variety of input formats. For a complete list, see the docs.
Examples
OpenCypher
$ grandlite 'vertex:vertices.csv;edge:edges.csv'
CSV / Edgelist with or without headers
$ grandlite 'h-edgelist(pre:post)://white_1986_n2u.csv'
Metadata
Release files for grandlite 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| grandlite-0.2.0.tar.gz | 47.5 kB | Without provenance | Details for grandlite-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| grandlite-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for grandlite-0.2.0-py3-none-any.whl |
Total release size: 60.0 kB
Release files / grandlite-0.2.0.tar.gz
| Download URL | grandlite-0.2.0.tar.gz |
|---|---|
| Size | 47.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
65409d4309b1566aa37023f983f716b3c80e6dd2daf6a2631c44232cd4874024
|
|
BLAKE2b-256 checksum How to use checksums |
02d345f853ca49db0f07a1f53da4a9858755fae66428f0d1cff862edede3d993
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / grandlite-0.2.0-py3-none-any.whl
| Download URL | grandlite-0.2.0-py3-none-any.whl |
|---|---|
| Size | 12.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
667df11c2000e4d3e77f1d095d5366608a8ce4845b83f595d1ab95f374e10de3
|
|
BLAKE2b-256 checksum How to use checksums |
0297e1a176864ef6f63f5f10b5257328191d314434483ec51bf4cc1e2c4aba74
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.22 {"installer":{"name":"uv","version":"0.9.22","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for grandlite 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.