Metadata-Version: 2.2
Name: dgraph_flex
Version: 0.1.0
Summary: A package for working with directed graphs
Author-email: "Kelvin O. Lim" <lim.kelvino@gmail.com>
Project-URL: Homepage, https://github.com/kelvinlim/dgraph_flex
Project-URL: Bug Tracker, https://github.com/kelvinlim/dgraph_flex/issues
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: graphviz
Requires-Dist: pyaml
Requires-Dist: matplotlib

# dgraph_flex

Package to support flexible storage of directed graphs, specifically for the support of 
directed graphs and causal structure analysis.

## unit tests

```
python -m unittest tests/*.py
```

## build

```
python -m build

# upload
twine upload dist/*

```

## sample usage

Here is a sample yaml file describing a graph
```yaml

GENERAL:
  version: 1.0
  framework: dgraph_flex

GRAPHS:
  - name: graph1
    edges:
      - label: edge1
        source: A
        target: B
        edge_type: -->
        properties:
          strength: 0.5
          pvalue: 0.01
          color: green
      - label: edge2
        source: B
        target: C
        edge_type: -->
        properties:
          strength: -0.5
          pvalue: 0.001
          color: red
      - label: edge3
        source: C
        target: E
        edge_type: o->
        properties:
          strength: 0.5
          pvalue: 0.0001
      - label: edge4
        source: B
        target: D
        edge_type: o-o
        properties:

```
Here is python code that reads in the graph and outputs a png

```python

from dgraph_flex import DgraphFlex

obj = DgraphFlex(yamlpath='graph_sample.yaml')
obj.cmd('plot')



```
