The tinygraphio graph data interchange file format
Project description
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).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tinygraphio-1.0.0.tar.gz.
File metadata
- Download URL: tinygraphio-1.0.0.tar.gz
- Upload date:
- Size: 8.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-58-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
906536d203804ae095dc272a2f0741e3b7cf19b726a9035959524fc3eb592711
|
|
| MD5 |
fe948ae107740ef8893d89a7d67ed30a
|
|
| BLAKE2b-256 |
569706505ba6ee384d2a683f8c81c1c7ef3e704bcf8082f93fd6e3778ef680f4
|
File details
Details for the file tinygraphio-1.0.0-py3-none-any.whl.
File metadata
- Download URL: tinygraphio-1.0.0-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.3.2 CPython/3.11.1 Linux/5.15.0-58-generic
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f0f27b2cdfa1dda9027886dd06037e3df7e91ee1d75c4c4ef0cef982924fc403
|
|
| MD5 |
3268035ba1a49a662307dc7509c46357
|
|
| BLAKE2b-256 |
73e73b0b7f7eea2f006652440b4717c6b539ccaf75f20b78d862e198f7f4c750
|