view lib/patchablegraph/README.md @ 597:e1ee6661329a

adjust kitchen PWM freqs. add comments and proposed contents of n3 configs Ignore-this: 8fc4659c1d8830e1ed66b0702b1e69fd
author drewp@bigasterisk.com
date Sat, 13 Jul 2019 19:58:50 -0700
parents 243b5af89842
children
line wrap: on
line source

RDF graph that accepts patches and serves them over HTTP (with a SSE protocol).

Example:

```
from patchablegraph import PatchableGraph

masterGraph = PatchableGraph()

```

Then, you call `masterGraph.patch`, etc to edit the
graph. `rdfdb.grapheditapi.GraphEditApi` is mixed in, so you can
use
[higher-level functions](https://bigasterisk.com/darcs/?r=rdfdb;a=headblob;f=/rdfdb/grapheditapi.py) from
there, such as patchObject.

Web serving:

``` from patchablegraph import CycloneGraphHandler,
CycloneGraphEventsHandler

reactor.listenTCP(9059, cyclone.web.Application([
    ...
    (r"/graph", CycloneGraphHandler, {'masterGraph': masterGraph}),
    (r"/graph/events", CycloneGraphEventsHandler, {'masterGraph': masterGraph}),
    ...
```