Skip to main content

Simple and flexible graph database analysis

Project description

Grandas

Grandas as a library that allows simplified, flexible analysis of the nodes and relationships stored in a graph database. It allows a user to search for and filter information and connections contained in a subgraph of a graph database.

Data Structures

Node

A Node object is the basic entity object and identifies any noun in your graph dataset.

Relationship

A Relationship stores the way that any two nodes in your dataset are related. Bi-directional relationships here are stored as two independent relationships.

NodeFrame

Nodeframes allow users to see the nodes in their graph databases, and further enable them to filter and resolve redundant nodes.

RelationshipFrame

The RelationshipFrame object stores a series of Relationship objects as a pandas DataFrame, using the hashed value of the full node to identify where the start and ending points for each relationship are.

GraphFrame

A GraphFrame is comprised of a NodeFrame (attribute: nodes) and a RelationshipFrame (attribute: rels).


Getting Started

To get started using grandas, you can install it using pip:

pip install grandas

From there, load in nodes and relationships to a GraphFrame object, similar to how you would use a pandas DataFrame.

import grandas as gd

nodes = [
  Node(label='PERSON',name='Alice',age='27'),
  Node(label='PERSON',name='Bob',age='24'),
  ]
alice, bob = nodes
rels = [
  Relationship(start=alice, end=bob, label='owes_money_to',amount=10)
]
gf = GraphFrame(nodes=nodes, relationships=rels)

node_frame = gf.nodes
relationship_frame =  gf.rels

Contributing

Contributions are more than welcome! Please just submit a pull request to the develop branch.

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

grandas-0.0.1.tar.gz (4.3 kB view details)

Uploaded Source

File details

Details for the file grandas-0.0.1.tar.gz.

File metadata

  • Download URL: grandas-0.0.1.tar.gz
  • Upload date:
  • Size: 4.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.33.0 CPython/3.6.5

File hashes

Hashes for grandas-0.0.1.tar.gz
Algorithm Hash digest
SHA256 59f5dab081327d70339690a7b14b69628c81722dedb0f95ba072c27b6f3685ff
MD5 cc91acd9f1ca5113a663e2f1d465e725
BLAKE2b-256 5de1f5d11768f9c8dc93edd6ea531d90f4f3cd4e787485929acc5cd247a2a848

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