diff README.md @ 0:c3f0a692c4cb

move repo from homeauto/lib/
author drewp@bigasterisk.com
date Wed, 24 Nov 2021 10:20:55 -0800
parents
children 8d908762fe1e
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/README.md	Wed Nov 24 10:20:55 2021 -0800
@@ -0,0 +1,29 @@
+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}),
+    ...
+```
+