Skip to main content

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 Tinygraph class implements a compressed sparse row graph
  • The TinygraphioReader implements reading a graph from a binary file-like object
  • The TinygraphioWriter implements 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

tinygraphio-1.0.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tinygraphio-1.0.0-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

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

Hashes for tinygraphio-1.0.0.tar.gz
Algorithm Hash digest
SHA256 906536d203804ae095dc272a2f0741e3b7cf19b726a9035959524fc3eb592711
MD5 fe948ae107740ef8893d89a7d67ed30a
BLAKE2b-256 569706505ba6ee384d2a683f8c81c1c7ef3e704bcf8082f93fd6e3778ef680f4

See more details on using hashes here.

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

Hashes for tinygraphio-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f0f27b2cdfa1dda9027886dd06037e3df7e91ee1d75c4c4ef0cef982924fc403
MD5 3268035ba1a49a662307dc7509c46357
BLAKE2b-256 73e73b0b7f7eea2f006652440b4717c6b539ccaf75f20b78d862e198f7f4c750

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page