summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--software/flask.page10
-rw-r--r--software/postgres.page17
2 files changed, 27 insertions, 0 deletions
diff --git a/software/flask.page b/software/flask.page
new file mode 100644
index 0000000..1df6bc6
--- /dev/null
+++ b/software/flask.page
@@ -0,0 +1,10 @@
+
+TODO: create a flask+sqlite3 template app?
+
+use sqlite.Row as a "row factory" to get key/value stuff
+
+JSON REST API? Use apispec and marshmallow; sqlalchemy ORM for persistence.
+
+- flask-apispec
+- flask-marshmallow
+- (etc)
diff --git a/software/postgres.page b/software/postgres.page
new file mode 100644
index 0000000..bdb01d8
--- /dev/null
+++ b/software/postgres.page
@@ -0,0 +1,17 @@
+
+Start a quick local docker database:
+
+ docker run -p 5432:5432 postgres:latest
+
+Connect (from outside):
+
+ psql -h localhost -w postgres
+
+Dump current schema with something like:
+
+ docker exec 6a018d9d8ef0 pg_dump -U postgres postgres -s | rg -v ^- > schema.sql
+
+Basic status from the psql command line:
+
+ \l+ (list databases)
+ \dt+ (describe table)