Add basic python rule for flatbuffers

Not 100% sure I'm actually going to *use* this now that I've looked at
things more carefully, but it may be helpful for doing some data
analysis stuff.

Change-Id: I695cfe019639617da5baec4d45f5de71ad79b223
diff --git a/build_tests/BUILD b/build_tests/BUILD
index 9dd539a..076e18c 100644
--- a/build_tests/BUILD
+++ b/build_tests/BUILD
@@ -1,5 +1,6 @@
 load("@com_google_protobuf//:protobuf.bzl", "cc_proto_library")
 load("//tools/cpp/emscripten:defs.bzl", "emcc_binary")
+load("@com_github_google_flatbuffers//:build_defs.bzl", "flatbuffer_python_library")
 
 emcc_binary(
     name = "helloworld.html",
@@ -79,3 +80,20 @@
         "//aos/testing:googletest",
     ],
 )
+
+flatbuffer_python_library(
+    name = "test_python_fbs",
+    srcs = ["test.fbs"],
+    namespace = "aos.examples",
+    tables = [
+        "Foo",
+        "Bar",
+    ],
+    visibility = ["//visibility:public"],
+)
+
+py_test(
+    name = "python_fbs",
+    srcs = ["python_fbs.py"],
+    deps = [":test_python_fbs"],
+)