]> git.notmuchmail.org Git - notmuch/blobdiff - bindings/python/docs/source/quickstart.rst
python: move the usage example to quickstart.rst
[notmuch] / bindings / python / docs / source / quickstart.rst
diff --git a/bindings/python/docs/source/quickstart.rst b/bindings/python/docs/source/quickstart.rst
new file mode 100644 (file)
index 0000000..609f42e
--- /dev/null
@@ -0,0 +1,19 @@
+Quickstart and examples
+=======================
+
+.. todo:: write a nice introduction
+.. todo:: improve the examples
+
+Notmuch can be imported as::
+
+    import notmuch
+
+or::
+
+    from notmuch import Query, Database
+
+    db = Database('path', create=True)
+    msgs = Query(db, 'from:myself').search_messages()
+
+    for msg in msgs:
+        print(msg)