Skip to main content

Graphinate. Data to Graphs.

⚠️ Under Development! ⚠️

This library is alpha-quality

PyPI PyPI - Status PyPI - Python Version GitHub PyPI - Downloads GitHub repo size Contributors GitHub last commit (by committer)

Tests Publish

Install

Graphinate is available on PyPI:

python -m pip install graphinate 

Graphinate officially supports Python 3.9+.

Introduction

What is Graphinate?

Graphinate aims to simplify the generation of Graph data structures from sources of data. It utilizes and build upon NetworkX

What is a Graph?

In a mathematician's terminology, a graph is a collection of points and lines connecting some (possibly empty) subset of them. The points of a graph are most commonly known as graph vertices, but may also be called "nodes" or simply " points." Similarly, the lines connecting the vertices of a graph are most commonly known as graph edges, but may also be called "arcs" or "lines."

— https://mathworld.wolfram.com/Graph.html

What is Data?

...data is a collection of discrete or continuous values that convey information, describing the quantity, quality, fact, statistics, other basic units of meaning, or simply sequences of symbols that may be further interpreted formally.

— https://en.wikipedia.org/wiki/Data

Defining a Graph

One can define Graphs in two general ways:

Edge first

Generate a Graph by supplying a list of edges. The simplest definition of an edge will be a tuple of 2 values. Each value represent a node (or vertex) in the graph. Additional attributes may be also added to the edge definition to signify additional meaning.

In this case one defines the edges explicitly and the nodes implicitly.

Such graph is focused more on the relationships or the structure of the Graph than on the nodes themselves.

Node first

Alternatively, one can first add nodes (vertices) to a graph without defining edges. Additional attributes may be added to the node definition to signify additional meaning. Later on edge definitions are added to generate the relationships between the nodes.

In this case both nodes and the edges are defines explicitly.

Such a graph has focus first on the nodes and later on the relationship between them.

d3_graph_ast repo_graph AST 3D Force animation

Examples

  • Code
    • Call Graph
    • Python AST
  • GitHub
    • Repository
    • Followers
  • Ethernet
    • Traceroute
  • Math
    • Graph Atlas
    • Hailstone
  • Text
    • NLP
  • Web
    • Web Graph

Guide

By Convention

https://github.com/erivlis/graphinate/blob/f5b363a360907aecf52cf11249b78666eb470d20/examples/github/followers.py#L1

By Configuration

https://github.com/erivlis/graphinate/blob/f5b363a360907aecf52cf11249b78666eb470d20/examples/github/repositories.py#L1

CLI

Commands

Usage: python -m graphinate [OPTIONS] COMMAND [ARGS]...

Options:
  --help  Show this message and exit.

Commands:
  save
  server

Save

Usage: python -m graphinate save [OPTIONS] MODEL

Options:
  --help  Show this message and exit.

Server

Usage: python -m graphinate server [OPTIONS] MODEL

Options:
  -p, --port INTEGER
  --help              Show this message and exit.

Development

Lint

ruff check src

Docs

python -m mkdocs build

Build

python -m build

Test

 python -m pytest ./tests --cov=./src --cov-branch --cov-report=xml --junitxml=test_results.xml

Acknowledgements

Dependencies

3D Force-Directed Graph Logo. Click Logo. Loguru Logo. matplotlib Logo. NetworkX Logo. Strawberry GraphQL Logo.

Dev Tools

Hatch logo. pytest logo. Ruff logo.

IDE

PyCharm logo.

Metadata

Release files for Graphinate 0.0.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Graphinate 0.0.8
File Size Uploaded Provenance Actions
graphinate-0.0.8.tar.gz 128.8 kB Without provenance Details for graphinate-0.0.8.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Graphinate 0.0.8
File Interpreter ABI Platform Actions
graphinate-0.0.8-py3-none-any.whl Python 3 none any Details for graphinate-0.0.8-py3-none-any.whl

Total release size: 198.6 kB

Release files / graphinate-0.0.8.tar.gz

Download URL graphinate-0.0.8.tar.gz
Size 128.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c7097c194a489a06b4773e920042d0404092455b9da6d5db644b1350efa4209c
BLAKE2b-256 checksum
How to use checksums
eb2a03fe03b0cf50377c11c497b76c50a6ccf3fe72db7690bce91789dd07e6b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Release files / graphinate-0.0.8-py3-none-any.whl

Download URL graphinate-0.0.8-py3-none-any.whl
Size 69.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c9c22df79e3045984523272b94b0edda89ff6fc2588f07766e765ef184c91975
BLAKE2b-256 checksum
How to use checksums
3ac10ec8c9dfbc0f829b7868ff5c5b993e8167d3a1e72c9ad3cf799344b0cb5a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.17

Security for Graphinate 0.0.8

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.

Release history Release notifications | RSS feed

This release

0.0.8 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page