tinygraphio
Python implementation of the tinygraphio graph data interchange file format.
Installation
Install with poetry
poetry add tinygraphio
Install with pip
pip install tinygraphio
Usage
- The
Tinygraphclass implements a compressed sparse row graph - The
TinygraphioReaderimplements reading a graph from a binary file-like object - The
TinygraphioWriterimplements writing a graph to a binary file-like object
from tinygraphio.graph import Tinygraph, Node, Edge
from tinygraphio.reader import TinygraphioReader
from tinygraphio.writer import TinygraphioWriter
Writing
graph = Tinygraph(offsets=[0, 2, 4, 5], targets=[1, 2, 0, 2, 1])
with open("berlin.tinygraph", "wb") as f:
writer = TinygraphioWriter(f)
writer.write(graph)
Reading
with open("berlin.tinygraph", "rb") as f:
reader = TinygraphioReader(f)
graph = reader.read()
Note: this library implements reading and writing a compressed sparse row graph in a The use case tinygraphio covers is storing large graphs effectively and efficiently and sharing graphs in a portable way. We do not provide a full-blown graph computation toolkit on purpose.
Development
License
Copyright © 2023 tinygraph
Distributed under the MIT License (MIT).
Metadata
Release files for tinygraphio 1.0.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 | |
|---|---|---|---|
| tinygraphio-1.0.0.tar.gz | 8.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tinygraphio-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.1 kB
Release files / tinygraphio-1.0.0.tar.gz
| Download URL | tinygraphio-1.0.0.tar.gz |
|---|---|
| Size | 8.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
906536d203804ae095dc272a2f0741e3b7cf19b726a9035959524fc3eb592711
|
|
BLAKE2b-256 checksum How to use checksums |
569706505ba6ee384d2a683f8c81c1c7ef3e704bcf8082f93fd6e3778ef680f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-58-generic
|
Release files / tinygraphio-1.0.0-py3-none-any.whl
| Download URL | tinygraphio-1.0.0-py3-none-any.whl |
|---|---|
| Size | 7.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f0f27b2cdfa1dda9027886dd06037e3df7e91ee1d75c4c4ef0cef982924fc403
|
|
BLAKE2b-256 checksum How to use checksums |
73e73b0b7f7eea2f006652440b4717c6b539ccaf75f20b78d862e198f7f4c750
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-58-generic
|