Skip to main content

Graphinate. Data to Graphs.

Project description

Graphinate. Data to Graphs.

[!WARNING] 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

Introduction

What is Graphinate?

Graphinate is a library that aims to simplify the generation of Graph Data Structures from Data Sources.

It utilizes and builds upon the excellent NetworkX library.

In addition, it has several interfaces for ease of use:

Install

Graphinate is available on PyPI:

pip install graphinate

To install with server support

pip install graphinate[server]

Graphinate officially supports Python 3.9+.

Quick Start

GraphModel

Graphinate defines the GraphModel Class which can be used to declaratively register Edge and/or Node data supplier functions by using decorators.

materialize

Graphinate supplies a materialize function to output the GraphModel.

Example

import graphinate

N: int = 8

# Define GraphModel
graph_model = graphinate.GraphModel(name="Octagonal Graph")


# Register edges supplier function
@graph_model.edge()
def edge():
    for i in range(N):
        yield {'source': i, 'target': i + 1}
    yield {'source': N, 'target': 0}


# Materialize the GraphModel
graphinate.materialize(graph_model)

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.

TUI

UNDER DEVELOPMENT

Gallery

Python AST

d3_graph_ast

GitHub Repository

repo_graph

Python AST - 3D Force-Directed Animation

AST 3D Force animation

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

Python

Click Logo. Loguru Logo. matplotlib Logo. NetworkX Logo. Strawberry GraphQL Logo.

Javascript and HTML

3D Force-Directed Graph Logo. Graphql Voyager Logo.

Dev Tools

Hatch logo. pytest logo. Ruff logo.

IDE

PyCharm logo.

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

graphinate-0.0.9.tar.gz (131.0 kB view details)

Uploaded Source

Built Distribution

graphinate-0.0.9-py3-none-any.whl (69.4 kB view details)

Uploaded Python 3

File details

Details for the file graphinate-0.0.9.tar.gz.

File metadata

  • Download URL: graphinate-0.0.9.tar.gz
  • Upload date:
  • Size: 131.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for graphinate-0.0.9.tar.gz
Algorithm Hash digest
SHA256 c44dbc09667ea64300b557fc57f505691028438ab74384adb4a0d64b399fd0cc
MD5 e60709a3126df704486c309fbe38643d
BLAKE2b-256 c406b85dcae8fb9ead2942b3825200043bec7fffcd42e8fc3ccb73351e9d61e1

See more details on using hashes here.

Provenance

File details

Details for the file graphinate-0.0.9-py3-none-any.whl.

File metadata

  • Download URL: graphinate-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 69.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.17

File hashes

Hashes for graphinate-0.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 827ddf0795f056e86e20b3fafd3aa56a9dd2d5db410b8bbc3781c4c2003243d2
MD5 66c8a995591d4b1ea78c3aafbf66413f
BLAKE2b-256 645d2e91a495b9c1aaae60fcd620ea7210d0aed71d98d6de05ae40b9ee9ebb28

See more details on using hashes here.

Provenance

Supported by

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