phoenix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From els...@apache.org
Subject [30/30] phoenix git commit: PHOENIX-4636 Add the python PQS driver
Date Wed, 21 Mar 2018 20:14:21 GMT
PHOENIX-4636 Add the python PQS driver


Project: http://git-wip-us.apache.org/repos/asf/phoenix/repo
Commit: http://git-wip-us.apache.org/repos/asf/phoenix/commit/d88e4972
Tree: http://git-wip-us.apache.org/repos/asf/phoenix/tree/d88e4972
Diff: http://git-wip-us.apache.org/repos/asf/phoenix/diff/d88e4972

Branch: refs/heads/4.x-HBase-0.98
Commit: d88e4972e7b4a0567ca1946d760c3f3c90bd7806
Parents: 37b1e11
Author: Josh Elser <elserj@apache.org>
Authored: Mon Mar 19 17:36:02 2018 -0400
Committer: Josh Elser <elserj@apache.org>
Committed: Wed Mar 21 16:13:27 2018 -0400

----------------------------------------------------------------------
 dev/make_rc.sh                                  |    5 +
 pom.xml                                         |    6 +
 python/.gitignore                               |    8 +
 python/.gitlab-ci.yml                           |  149 ++
 python/NEWS.rst                                 |   44 +
 python/README.rst                               |  136 ++
 python/RELEASING.rst                            |   12 +
 python/ci/build-env/Dockerfile                  |    7 +
 python/ci/phoenix/Dockerfile                    |   33 +
 python/ci/phoenix/docker-entrypoint.sh          |   24 +
 python/ci/phoenix/hbase-site.xml                |   12 +
 python/doc/Makefile                             |  192 ++
 python/doc/api.rst                              |   30 +
 python/doc/conf.py                              |  287 +++
 python/doc/index.rst                            |   27 +
 python/doc/versions.rst                         |    3 +
 python/docker-compose.yml                       |   21 +
 python/examples/basic.py                        |   27 +
 python/examples/shell.py                        |   33 +
 python/gen-protobuf.sh                          |   38 +
 python/phoenixdb/__init__.py                    |   68 +
 python/phoenixdb/avatica/__init__.py            |   16 +
 python/phoenixdb/avatica/client.py              |  510 ++++++
 python/phoenixdb/avatica/proto/__init__.py      |    0
 python/phoenixdb/avatica/proto/common_pb2.py    | 1667 ++++++++++++++++++
 python/phoenixdb/avatica/proto/requests_pb2.py  | 1206 +++++++++++++
 python/phoenixdb/avatica/proto/responses_pb2.py |  917 ++++++++++
 python/phoenixdb/connection.py                  |  187 ++
 python/phoenixdb/cursor.py                      |  347 ++++
 python/phoenixdb/errors.py                      |   93 +
 python/phoenixdb/tests/__init__.py              |   44 +
 python/phoenixdb/tests/dbapi20.py               |  857 +++++++++
 python/phoenixdb/tests/test_avatica.py          |   25 +
 python/phoenixdb/tests/test_connection.py       |   42 +
 python/phoenixdb/tests/test_db.py               |   99 ++
 python/phoenixdb/tests/test_dbapi20.py          |  122 ++
 python/phoenixdb/tests/test_errors.py           |   60 +
 python/phoenixdb/tests/test_types.py            |  327 ++++
 python/phoenixdb/types.py                       |  202 +++
 python/requirements.txt                         |   20 +
 python/setup.cfg                                |   34 +
 python/setup.py                                 |   64 +
 python/tox.ini                                  |   24 +
 43 files changed, 8025 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/dev/make_rc.sh
----------------------------------------------------------------------
diff --git a/dev/make_rc.sh b/dev/make_rc.sh
index a788a5f..47439d3 100755
--- a/dev/make_rc.sh
+++ b/dev/make_rc.sh
@@ -40,6 +40,7 @@ DIR_BIN=$DIR_REL_BIN_PATH/bin
 DIR_PHERF_CONF=phoenix-pherf/config
 DIR_EXAMPLES=$DIR_REL_BIN_PATH/examples
 DIR_DOCS=dev/release_files
+DIR_PYTHON=$DIR_REL_BIN_PATH/python
 
 # Verify no target exists
 mvn clean; rm -rf $DIR_REL_BASE;
@@ -64,6 +65,7 @@ mkdir $DIR_REL_BIN_TAR_PATH;
 mkdir $DIR_REL_SRC_TAR_PATH;
 mkdir $DIR_EXAMPLES;
 mkdir $DIR_BIN;
+mkdir $DIR_PYTHON;
 
 # Move src tar
 mv $REL_SRC.tar.gz $DIR_REL_SRC_TAR_PATH;
@@ -87,6 +89,9 @@ cp $DIR_DOCS/* $DIR_REL_BIN_PATH;
 # Copy examples
 cp -r examples/* $DIR_EXAMPLES
 
+# Copy the python driver
+cp -r python/* $DIR_PYTHON
+
 # Generate bin tar
 tar cvzf $DIR_REL_BIN_TAR_PATH/$DIR_REL_BIN.tar.gz -C $DIR_REL_ROOT apache-phoenix-$PHOENIX-bin;
 rm -rf $DIR_REL_BIN_PATH;

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index b5b7a4e..035006e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -478,6 +478,12 @@
             <!-- Argparse is bundled to work around system Python version
                  issues, compatibile with ALv2 -->
             <exclude>bin/argparse-1.4.0/argparse.py</exclude>
+            <exclude>python/ci/**</exclude>
+            <exclude>python/phoenixdb/avatica/proto/*</exclude>
+            <exclude>python/*.rst</exclude>
+            <exclude>python/doc/*.rst</exclude>
+            <exclude>python/doc/conf.py</exclude>
+            <exclude>python/doc/Makefile</exclude>
           </excludes>
         </configuration>
       </plugin>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/.gitignore
----------------------------------------------------------------------
diff --git a/python/.gitignore b/python/.gitignore
new file mode 100644
index 0000000..57335c6
--- /dev/null
+++ b/python/.gitignore
@@ -0,0 +1,8 @@
+/dist/
+/build/
+/doc/_build/
+/doc/build/
+*.pyc
+*.egg-info/
+.vagrant/
+.tox

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/.gitlab-ci.yml
----------------------------------------------------------------------
diff --git a/python/.gitlab-ci.yml b/python/.gitlab-ci.yml
new file mode 100644
index 0000000..6e58a23
--- /dev/null
+++ b/python/.gitlab-ci.yml
@@ -0,0 +1,149 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+stages:
+  - prepare
+  - test
+
+build build-env image:
+  stage: prepare
+  script:
+    - cd ci/build-env
+    - docker build -t ${CI_REGISTRY_IMAGE}/build-env .
+    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
+    - docker push $CI_REGISTRY_IMAGE/build-env
+  tags:
+    - docker-host
+  only:
+    - master@lukas/python-phoenixdb
+
+.build-phoenix-image: &build_phoenix_image
+  stage: prepare
+  script:
+    - JOB_NAME=($CI_JOB_NAME)
+    - cd ci/phoenix
+    - docker build -t ${CI_REGISTRY_IMAGE}/phoenix:${JOB_NAME[2]}
+        --build-arg PHOENIX_VERSION=$PHOENIX_VERSION
+        --build-arg HBASE_VERSION=$HBASE_VERSION
+        --build-arg HBASE_DIR=$HBASE_DIR
+        .
+    - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
+    - docker push $CI_REGISTRY_IMAGE/phoenix:${JOB_NAME[2]}
+  tags:
+    - docker-host
+
+build phoenix 5.0.0-alpha-HBase-2.0 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 5.0.0-alpha-HBase-2.0
+    HBASE_VERSION: 2.0.0-beta-1
+    HBASE_DIR: hbase-2.0.0-beta-1
+
+build phoenix 4.13 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.13.1-HBase-1.3
+    HBASE_VERSION: 1.3.1
+    HBASE_DIR: 1.3.1
+
+build phoenix 4.12 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.12.0-HBase-1.3
+    HBASE_VERSION: 1.3.1
+    HBASE_DIR: 1.3.1
+
+build phoenix 4.11 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.11.0-HBase-1.3
+    HBASE_VERSION: 1.3.1
+    HBASE_DIR: 1.3.1
+
+build phoenix 4.10 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.10.0-HBase-1.2
+    HBASE_VERSION: 1.2.6
+    HBASE_DIR: 1.2.6
+
+build phoenix 4.9 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.9.0-HBase-1.2
+    HBASE_VERSION: 1.2.6
+    HBASE_DIR: 1.2.6
+
+build phoenix 4.8 image:
+  <<: *build_phoenix_image
+  variables:
+    PHOENIX_VERSION: 4.8.2-HBase-1.2
+    HBASE_VERSION: 1.2.6
+    HBASE_DIR: 1.2.6
+
+.test: &test
+  image: $CI_REGISTRY_IMAGE/build-env
+  variables:
+    PHOENIXDB_TEST_DB_URL: http://phoenix:8765/
+    PIP_CACHE_DIR: $CI_PROJECT_DIR/cache/
+  script:
+    - tox -e py27,py35
+  cache:
+    paths:
+      - cache/
+  tags:
+    - docker
+
+test phoenix 5.0.0-alpha-HBase-2.0:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:5.0.0-alpha-HBase-2.0
+      alias: phoenix
+
+test phoenix 4.13:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.13
+      alias: phoenix
+
+test phoenix 4.12:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.12
+      alias: phoenix
+
+test phoenix 4.11:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.11
+      alias: phoenix
+
+test phoenix 4.10:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.10
+      alias: phoenix
+
+test phoenix 4.9:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.9
+      alias: phoenix
+
+test phoenix 4.8:
+  <<: *test
+  services:
+    - name: $CI_REGISTRY_IMAGE/phoenix:4.8
+      alias: phoenix

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/NEWS.rst
----------------------------------------------------------------------
diff --git a/python/NEWS.rst b/python/NEWS.rst
new file mode 100644
index 0000000..21e2277
--- /dev/null
+++ b/python/NEWS.rst
@@ -0,0 +1,44 @@
+Changelog
+=========
+
+Version 0.7
+-----------
+
+- Added DictCursor for easier access to columns by their names.
+- Support for Phoenix versions from 4.8 to 4.11.
+
+Version 0.6
+-----------
+
+- Fixed result fetching when using a query with parameters.
+- Support for Phoenix 4.9.
+
+Version 0.5
+-----------
+
+- Added support for Python 3.
+- Switched from the JSON serialization to Protocol Buffers, improved compatibility with Phoenix 4.8.
+- Phoenix 4.6 and older are no longer supported.
+
+Version 0.4
+-----------
+
+- Fixes for the final version of Phoenix 4.7.
+
+Version 0.3
+-----------
+
+- Compatible with Phoenix 4.7.
+
+Version 0.2
+-----------
+
+- Added (configurable) retry on connection errors.
+- Added Vagrantfile for easier testing.
+- Compatible with Phoenix 4.6.
+
+Version 0.1
+-----------
+
+- Initial release.
+- Compatible with Phoenix 4.4.

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/README.rst
----------------------------------------------------------------------
diff --git a/python/README.rst b/python/README.rst
new file mode 100644
index 0000000..c74104c
--- /dev/null
+++ b/python/README.rst
@@ -0,0 +1,136 @@
+Phoenix database adapter for Python
+===================================
+
+.. image:: https://code.oxygene.sk/lukas/python-phoenixdb/badges/master/pipeline.svg
+    :target: https://code.oxygene.sk/lukas/python-phoenixdb/commits/master
+    :alt: Build Status
+
+.. image:: https://readthedocs.org/projects/python-phoenixdb/badge/?version=latest
+    :target: http://python-phoenixdb.readthedocs.io/en/latest/?badge=latest
+    :alt: Documentation Status
+
+``phoenixdb`` is a Python library for accessing the
+`Phoenix SQL database <http://phoenix.apache.org/>`_
+using the
+`remote query server <http://phoenix.apache.org/server.html>`_.
+The library implements the
+standard `DB API 2.0 <https://www.python.org/dev/peps/pep-0249/>`_ interface,
+which should be familiar to most Python programmers.
+
+Installation
+------------
+
+The easiest way to install the library is using `pip <https://pip.pypa.io/en/stable/>`_::
+
+    pip install phoenixdb
+
+You can also download the source code from `here <https://phoenix.apache.org/download.html>`_,
+extract the archive and then install it manually::
+
+    cd /path/to/apache-phoenix-x.y.z/phoenix
+    python setup.py install
+
+Usage
+-----
+
+The library implements the standard DB API 2.0 interface, so it can be
+used the same way you would use any other SQL database from Python, for example::
+
+    import phoenixdb
+    import phoenixdb.cursor
+
+    database_url = 'http://localhost:8765/'
+    conn = phoenixdb.connect(database_url, autocommit=True)
+
+    cursor = conn.cursor()
+    cursor.execute("CREATE TABLE users (id INTEGER PRIMARY KEY, username VARCHAR)")
+    cursor.execute("UPSERT INTO users VALUES (?, ?)", (1, 'admin'))
+    cursor.execute("SELECT * FROM users")
+    print(cursor.fetchall())
+
+    cursor = conn.cursor(cursor_factory=phoenixdb.cursor.DictCursor)
+    cursor.execute("SELECT * FROM users WHERE id=1")
+    print(cursor.fetchone()['USERNAME'])
+
+
+Setting up a development environment
+------------------------------------
+
+If you want to quickly try out the included examples, you can set up a
+local `virtualenv <https://virtualenv.pypa.io/en/latest/>`_ with all the
+necessary requirements::
+
+    virtualenv e
+    source e/bin/activate
+    pip install -r requirements.txt
+    python setup.py develop
+
+To create or update the Avatica protobuf classes, change the tag in ``gen-protobuf.sh``
+and run the script.
+
+If you need a Phoenix query server for experimenting, you can get one running
+quickly using `Docker <https://www.docker.com/>`_::
+
+    docker-compose up
+
+Or if you need an older version of Phoenix::
+
+    PHOENIX_VERSION=4.9 docker-compose up
+
+If you want to use the library without installing the phoenixdb library, you can use
+the `PYTHONPATH` environment variable to point to the library directly::
+
+    cd $PHOENIX_HOME/python
+    python setup.py build
+    cd ~/my_project
+    PYTHONPATH=$PHOENIX_HOME/build/lib python my_app.py
+
+Interactive SQL shell
+---------------------
+
+There is a Python-based interactive shell include in the examples folder, which can be
+used to connect to Phoenix and execute queries::
+
+    ./examples/shell.py http://localhost:8765/
+    db=> CREATE TABLE test (id INTEGER PRIMARY KEY, name VARCHAR);
+    no rows affected (1.363 seconds)
+    db=> UPSERT INTO test (id, name) VALUES (1, 'Lukas');
+    1 row affected (0.004 seconds)
+    db=> SELECT * FROM test;
+    +------+-------+
+    |   ID | NAME  |
+    +======+=======+
+    |    1 | Lukas |
+    +------+-------+
+    1 row selected (0.019 seconds)
+
+Running the test suite
+----------------------
+
+The library comes with a test suite for testing Python DB API 2.0 compliance and
+various Phoenix-specific features. In order to run the test suite, you need a
+working Phoenix database and set the ``PHOENIXDB_TEST_DB_URL`` environment variable::
+
+    export PHOENIXDB_TEST_DB_URL='http://localhost:8765/'
+    nosetests
+
+Similarly, tox can be used to run the test suite against multiple Python versions::
+
+    pyenv install 3.5.5
+    pyenv install 3.6.4
+    pyenv install 2.7.14
+    pyenv global 2.7.14 3.5.5 3.6.4
+    PHOENIXDB_TEST_DB_URL='http://localhost:8765' tox
+
+Known issues
+------------
+
+- You can only use the library in autocommit mode. The native Java Phoenix library also implements batched upserts, which can be committed at once, but this is not exposed over the remote server. This was previously unimplemented due to CALCITE-767, however this functionality exists in the server, but is lacking in the driver.
+  (`CALCITE-767 <https://issues.apache.org/jira/browse/CALCITE-767>`_)
+- TIME and DATE columns in Phoenix are stored as full timestamps with a millisecond accuracy,
+  but the remote protocol only exposes the time (hour/minute/second) or date (year/month/day)
+  parts of the columns. (`CALCITE-797 <https://issues.apache.org/jira/browse/CALCITE-797>`_, `CALCITE-798 <https://issues.apache.org/jira/browse/CALCITE-798>`_)
+- TIMESTAMP columns in Phoenix are stored with a nanosecond accuracy, but the remote protocol truncates them to milliseconds. (`CALCITE-796 <https://issues.apache.org/jira/browse/CALCITE-796>`_)
+- ARRAY columns are not supported. Again, this previously lacked server-side support which has since been built. The
+  driver needs to be updated to support this functionality.
+  (`CALCITE-1050 <https://issues.apache.org/jira/browse/CALCITE-1050>`_, `PHOENIX-2585 <https://issues.apache.org/jira/browse/PHOENIX-2585>`_)

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/RELEASING.rst
----------------------------------------------------------------------
diff --git a/python/RELEASING.rst b/python/RELEASING.rst
new file mode 100644
index 0000000..d996cfe
--- /dev/null
+++ b/python/RELEASING.rst
@@ -0,0 +1,12 @@
+Releasing a new version
+=======================
+
+Change the version number ``setup.py`` and ``NEWS.rst``.
+
+Commit the changes and tag the repository::
+
+    git tag -s vX.Y
+
+Upload the package to PyPI::
+
+    python setup.py clean sdist upload

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/ci/build-env/Dockerfile
----------------------------------------------------------------------
diff --git a/python/ci/build-env/Dockerfile b/python/ci/build-env/Dockerfile
new file mode 100644
index 0000000..08ce45c
--- /dev/null
+++ b/python/ci/build-env/Dockerfile
@@ -0,0 +1,7 @@
+FROM ubuntu:xenial
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y python-dev python3-dev tox
+
+RUN apt-get update && \
+    DEBIAN_FRONTEND=noninteractive apt-get install -y git

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/ci/phoenix/Dockerfile
----------------------------------------------------------------------
diff --git a/python/ci/phoenix/Dockerfile b/python/ci/phoenix/Dockerfile
new file mode 100644
index 0000000..fc6fadc
--- /dev/null
+++ b/python/ci/phoenix/Dockerfile
@@ -0,0 +1,33 @@
+FROM openjdk:8
+
+ARG HBASE_VERSION
+ARG HBASE_DIR
+ARG PHOENIX_VERSION
+ARG PHOENIX_NAME=apache-phoenix
+
+ENV HBASE_URL https://archive.apache.org/dist/hbase/$HBASE_DIR/hbase-$HBASE_VERSION-bin.tar.gz
+
+RUN wget --no-verbose -O hbase.tar.gz "$HBASE_URL" && \
+    mkdir /opt/hbase && \
+    tar xf hbase.tar.gz --strip-components=1 -C /opt/hbase && \
+    rm hbase.tar.gz
+
+ENV PHOENIX_URL https://archive.apache.org/dist/phoenix/apache-phoenix-$PHOENIX_VERSION/bin/apache-phoenix-$PHOENIX_VERSION-bin.tar.gz
+
+RUN wget --no-verbose -O phoenix.tar.gz "$PHOENIX_URL" && \
+    mkdir /opt/phoenix && \
+    tar xf phoenix.tar.gz --strip-components=1 -C /opt/phoenix && \
+    rm phoenix.tar.gz
+
+RUN ln -sv /opt/phoenix/phoenix-*-server.jar /opt/hbase/lib/
+
+ADD hbase-site.xml /opt/hbase/conf/hbase-site.xml
+
+ENV HBASE_CONF_DIR /opt/hbase/conf
+ENV HBASE_CP /opt/hbase/lib
+ENV HBASE_HOME /opt/hbase
+
+EXPOSE 8765
+
+COPY docker-entrypoint.sh /usr/local/bin/
+ENTRYPOINT ["docker-entrypoint.sh"]

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/ci/phoenix/docker-entrypoint.sh
----------------------------------------------------------------------
diff --git a/python/ci/phoenix/docker-entrypoint.sh b/python/ci/phoenix/docker-entrypoint.sh
new file mode 100755
index 0000000..0bcc6da
--- /dev/null
+++ b/python/ci/phoenix/docker-entrypoint.sh
@@ -0,0 +1,24 @@
+#!/usr/bin/env bash
+
+pids=()
+
+/opt/hbase/bin/hbase-daemon.sh foreground_start master &
+pids+=($!)
+
+/opt/phoenix/bin/queryserver.py &
+pids+=($!)
+
+cleanup() {
+    if [ ${#pids[@]} -ne 0 ]
+    then
+        pids=($(ps -o pid= -p "${pids[@]}"))
+        if [ ${#pids[@]} -ne 0 ]
+        then
+            kill "${pids[@]}"
+        fi
+    fi
+}
+
+trap cleanup SIGCHLD SIGINT SIGTERM
+
+wait

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/ci/phoenix/hbase-site.xml
----------------------------------------------------------------------
diff --git a/python/ci/phoenix/hbase-site.xml b/python/ci/phoenix/hbase-site.xml
new file mode 100644
index 0000000..0e9a1b1
--- /dev/null
+++ b/python/ci/phoenix/hbase-site.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0"?>
+<?xml-stylesheet type="text/xsl" href="configuration.xsl"?>
+<configuration>
+    <property>
+        <name>hbase.regionserver.wal.codec</name>
+        <value>org.apache.hadoop.hbase.regionserver.wal.IndexedWALEditCodec</value>
+    </property>
+	<property>
+		<name>phoenix.schema.isNamespaceMappingEnabled</name>
+		<value>true</value>
+	</property>
+</configuration>

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/doc/Makefile
----------------------------------------------------------------------
diff --git a/python/doc/Makefile b/python/doc/Makefile
new file mode 100644
index 0000000..31eb086
--- /dev/null
+++ b/python/doc/Makefile
@@ -0,0 +1,192 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS    =
+SPHINXBUILD   = sphinx-build
+PAPER         =
+BUILDDIR      = _build
+
+# User-friendly check for sphinx-build
+ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
+$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
+endif
+
+# Internal variables.
+PAPEROPT_a4     = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS   = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+# the i18n builder cannot share the environment and doctrees with the others
+I18NSPHINXOPTS  = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext
+
+help:
+	@echo "Please use \`make <target>' where <target> is one of"
+	@echo "  html       to make standalone HTML files"
+	@echo "  dirhtml    to make HTML files named index.html in directories"
+	@echo "  singlehtml to make a single large HTML file"
+	@echo "  pickle     to make pickle files"
+	@echo "  json       to make JSON files"
+	@echo "  htmlhelp   to make HTML files and a HTML help project"
+	@echo "  qthelp     to make HTML files and a qthelp project"
+	@echo "  applehelp  to make an Apple Help Book"
+	@echo "  devhelp    to make HTML files and a Devhelp project"
+	@echo "  epub       to make an epub"
+	@echo "  latex      to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+	@echo "  latexpdf   to make LaTeX files and run them through pdflatex"
+	@echo "  latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
+	@echo "  text       to make text files"
+	@echo "  man        to make manual pages"
+	@echo "  texinfo    to make Texinfo files"
+	@echo "  info       to make Texinfo files and run them through makeinfo"
+	@echo "  gettext    to make PO message catalogs"
+	@echo "  changes    to make an overview of all changed/added/deprecated items"
+	@echo "  xml        to make Docutils-native XML files"
+	@echo "  pseudoxml  to make pseudoxml-XML files for display purposes"
+	@echo "  linkcheck  to check all external links for integrity"
+	@echo "  doctest    to run all doctests embedded in the documentation (if enabled)"
+	@echo "  coverage   to run coverage check of the documentation (if enabled)"
+
+clean:
+	rm -rf $(BUILDDIR)/*
+
+html:
+	$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+	$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+	@echo
+	@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+singlehtml:
+	$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
+	@echo
+	@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
+
+pickle:
+	$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+	@echo
+	@echo "Build finished; now you can process the pickle files."
+
+json:
+	$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+	@echo
+	@echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+	$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+	@echo
+	@echo "Build finished; now you can run HTML Help Workshop with the" \
+	      ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+	$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+	@echo
+	@echo "Build finished; now you can run "qcollectiongenerator" with the" \
+	      ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+	@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/phoenixdb.qhcp"
+	@echo "To view the help file:"
+	@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/phoenixdb.qhc"
+
+applehelp:
+	$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
+	@echo
+	@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
+	@echo "N.B. You won't be able to view it unless you put it in" \
+	      "~/Library/Documentation/Help or install it in your application" \
+	      "bundle."
+
+devhelp:
+	$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
+	@echo
+	@echo "Build finished."
+	@echo "To view the help file:"
+	@echo "# mkdir -p $$HOME/.local/share/devhelp/phoenixdb"
+	@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/phoenixdb"
+	@echo "# devhelp"
+
+epub:
+	$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
+	@echo
+	@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
+
+latex:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo
+	@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+	@echo "Run \`make' in that directory to run these through (pdf)latex" \
+	      "(use \`make latexpdf' here to do that automatically)."
+
+latexpdf:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through pdflatex..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+latexpdfja:
+	$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+	@echo "Running LaTeX files through platex and dvipdfmx..."
+	$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
+	@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
+
+text:
+	$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
+	@echo
+	@echo "Build finished. The text files are in $(BUILDDIR)/text."
+
+man:
+	$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
+	@echo
+	@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
+
+texinfo:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo
+	@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
+	@echo "Run \`make' in that directory to run these through makeinfo" \
+	      "(use \`make info' here to do that automatically)."
+
+info:
+	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
+	@echo "Running Texinfo files through makeinfo..."
+	make -C $(BUILDDIR)/texinfo info
+	@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
+
+gettext:
+	$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
+	@echo
+	@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
+
+changes:
+	$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+	@echo
+	@echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+	$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+	@echo
+	@echo "Link check complete; look for any errors in the above output " \
+	      "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+	$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+	@echo "Testing of doctests in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/doctest/output.txt."
+
+coverage:
+	$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
+	@echo "Testing of coverage in the sources finished, look at the " \
+	      "results in $(BUILDDIR)/coverage/python.txt."
+
+xml:
+	$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
+	@echo
+	@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
+
+pseudoxml:
+	$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
+	@echo
+	@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/doc/api.rst
----------------------------------------------------------------------
diff --git a/python/doc/api.rst b/python/doc/api.rst
new file mode 100644
index 0000000..cac317c
--- /dev/null
+++ b/python/doc/api.rst
@@ -0,0 +1,30 @@
+API Reference
+=============
+
+phoenixdb module
+----------------
+
+.. automodule:: phoenixdb
+    :members:
+    :undoc-members:
+
+phoenixdb.connection module
+---------------------------
+
+.. automodule:: phoenixdb.connection
+    :members:
+    :undoc-members:
+
+phoenixdb.cursor module
+-----------------------
+
+.. automodule:: phoenixdb.cursor
+    :members:
+    :undoc-members:
+
+phoenixdb.avatica module
+------------------------
+
+.. automodule:: phoenixdb.avatica
+    :members:
+    :undoc-members:

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/doc/conf.py
----------------------------------------------------------------------
diff --git a/python/doc/conf.py b/python/doc/conf.py
new file mode 100644
index 0000000..21898d7
--- /dev/null
+++ b/python/doc/conf.py
@@ -0,0 +1,287 @@
+# -*- coding: utf-8 -*-
+#
+# phoenixdb documentation build configuration file, created by
+# sphinx-quickstart on Sun Jun 28 18:07:35 2015.
+#
+# This file is execfile()d with the current directory set to its
+# containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys
+import os
+import shlex
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path here. If the directory is relative to the
+# documentation root, use os.path.abspath to make it absolute, like shown here.
+sys.path.insert(0, os.path.abspath('../phoenixdb'))
+
+# -- General configuration ------------------------------------------------
+
+# If your documentation needs a minimal Sphinx version, state it here.
+#needs_sphinx = '1.0'
+
+# Add any Sphinx extension module names here, as strings. They can be
+# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
+# ones.
+extensions = [
+    'sphinx.ext.autodoc',
+    'sphinx.ext.doctest',
+    'sphinx.ext.intersphinx',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix(es) of source filenames.
+# You can specify multiple suffix as a list of string:
+# source_suffix = ['.rst', '.md']
+source_suffix = '.rst'
+
+# The encoding of source files.
+source_encoding = 'utf-8-sig'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'phoenixdb'
+copyright = u'2015, Lukas Lalinsky'
+author = u'Lukas Lalinsky'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#
+# This is also used if you do content translation via gettext catalogs.
+# Usually you set "language" from the command line for these cases.
+language = None
+
+# There are two options for replacing |today|: either, you set today to some
+# non-false value, then it is used:
+#today = ''
+# Else, today_fmt is used as the format for a strftime call.
+#today_fmt = '%B %d, %Y'
+
+# List of patterns, relative to source directory, that match files and
+# directories to ignore when looking for source files.
+exclude_patterns = ['_build']
+
+# The reST default role (used for this markup: `text`) to use for all
+# documents.
+#default_role = None
+
+# If true, '()' will be appended to :func: etc. cross-reference text.
+#add_function_parentheses = True
+
+# If true, the current module name will be prepended to all description
+# unit titles (such as .. function::).
+#add_module_names = True
+
+# If true, sectionauthor and moduleauthor directives will be shown in the
+# output. They are ignored by default.
+#show_authors = False
+
+# The name of the Pygments (syntax highlighting) style to use.
+pygments_style = 'sphinx'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+# If true, keep warnings as "system message" paragraphs in the built documents.
+#keep_warnings = False
+
+# If true, `todo` and `todoList` produce output, else they produce nothing.
+todo_include_todos = False
+
+
+# -- Options for HTML output ----------------------------------------------
+
+# The theme to use for HTML and HTML Help pages.  See the documentation for
+# a list of builtin themes.
+html_theme = 'classic'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further.  For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents.  If None, it defaults to
+# "<project> v<release> documentation".
+#html_title = None
+
+# A shorter title for the navigation bar.  Default is the same as html_title.
+#html_short_title = None
+
+# The name of an image file (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# The name of an image file (within the static path) to use as favicon of the
+# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
+# pixels large.
+#html_favicon = None
+
+# Add any paths that contain custom static files (such as style sheets) here,
+# relative to this directory. They are copied after the builtin static files,
+# so a file named "default.css" will overwrite the builtin "default.css".
+html_static_path = ['_static']
+
+# Add any extra paths that contain custom files (such as robots.txt or
+# .htaccess) here, relative to this directory. These files are copied
+# directly to the root of the documentation.
+#html_extra_path = []
+
+# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
+# using the given strftime format.
+#html_last_updated_fmt = '%b %d, %Y'
+
+# If true, SmartyPants will be used to convert quotes and dashes to
+# typographically correct entities.
+#html_use_smartypants = True
+
+# Custom sidebar templates, maps document names to template names.
+#html_sidebars = {}
+
+# Additional templates that should be rendered to pages, maps page names to
+# template names.
+#html_additional_pages = {}
+
+# If false, no module index is generated.
+#html_domain_indices = True
+
+# If false, no index is generated.
+#html_use_index = True
+
+# If true, the index is split into individual pages for each letter.
+#html_split_index = False
+
+# If true, links to the reST sources are added to the pages.
+html_show_sourcelink = False
+
+# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
+#html_show_sphinx = True
+
+# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
+#html_show_copyright = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> tag referring to it.  The value of this option must be the
+# base URL from which the finished HTML is served.
+#html_use_opensearch = ''
+
+# This is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = None
+
+# Language to be used for generating the HTML full-text search index.
+# Sphinx supports the following languages:
+#   'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
+#   'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
+#html_search_language = 'en'
+
+# A dictionary with options for the search language support, empty by default.
+# Now only 'ja' uses this config value
+#html_search_options = {'type': 'default'}
+
+# The name of a javascript file (relative to the configuration directory) that
+# implements a search results scorer. If empty, the default will be used.
+#html_search_scorer = 'scorer.js'
+
+# Output file base name for HTML help builder.
+htmlhelp_basename = 'phoenixdbdoc'
+
+# -- Options for LaTeX output ---------------------------------------------
+
+#latex_elements = {
+# The paper size ('letterpaper' or 'a4paper').
+#'papersize': 'letterpaper',
+
+# The font size ('10pt', '11pt' or '12pt').
+#'pointsize': '10pt',
+
+# Additional stuff for the LaTeX preamble.
+#'preamble': '',
+
+# Latex figure (float) alignment
+#'figure_align': 'htbp',
+#}
+
+# Grouping the document tree into LaTeX files. List of tuples
+# (source start file, target name, title,
+#  author, documentclass [howto, manual, or own class]).
+#latex_documents = [
+#  (master_doc, 'phoenixdb.tex', u'phoenixdb Documentation',
+#   u'Lukas Lalinsky', 'manual'),
+#]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# For "manual" documents, if this is true, then toplevel headings are parts,
+# not chapters.
+#latex_use_parts = False
+
+# If true, show page references after internal links.
+#latex_show_pagerefs = False
+
+# If true, show URL addresses after external links.
+#latex_show_urls = False
+
+# Documents to append as an appendix to all manuals.
+#latex_appendices = []
+
+# If false, no module index is generated.
+#latex_domain_indices = True
+
+
+# -- Options for manual page output ---------------------------------------
+
+# One entry per manual page. List of tuples
+# (source start file, name, description, authors, manual section).
+man_pages = [
+    (master_doc, 'phoenixdb', u'phoenixdb Documentation',
+     [author], 1)
+]
+
+# If true, show URL addresses after external links.
+#man_show_urls = False
+
+
+# -- Options for Texinfo output -------------------------------------------
+
+# Grouping the document tree into Texinfo files. List of tuples
+# (source start file, target name, title, author,
+#  dir menu entry, description, category)
+texinfo_documents = [
+  (master_doc, 'phoenixdb', u'phoenixdb Documentation',
+   author, 'phoenixdb', 'One line description of project.',
+   'Miscellaneous'),
+]
+
+# Documents to append as an appendix to all manuals.
+#texinfo_appendices = []
+
+# If false, no module index is generated.
+#texinfo_domain_indices = True
+
+# How to display URL addresses: 'footnote', 'no', or 'inline'.
+#texinfo_show_urls = 'footnote'
+
+# If true, do not generate a @detailmenu in the "Top" node's menu.
+#texinfo_no_detailmenu = False
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'https://docs.python.org/': None}

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/doc/index.rst
----------------------------------------------------------------------
diff --git a/python/doc/index.rst b/python/doc/index.rst
new file mode 100644
index 0000000..ada7fb8
--- /dev/null
+++ b/python/doc/index.rst
@@ -0,0 +1,27 @@
+.. include:: ../README.rst
+
+API Reference
+-------------
+
+.. toctree::
+   :maxdepth: 2
+
+   api
+
+Changelog
+-------------
+
+.. toctree::
+   :maxdepth: 2
+
+   versions
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
+
+
+.. _

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/doc/versions.rst
----------------------------------------------------------------------
diff --git a/python/doc/versions.rst b/python/doc/versions.rst
new file mode 100644
index 0000000..f3830fd
--- /dev/null
+++ b/python/doc/versions.rst
@@ -0,0 +1,3 @@
+.. include:: ../NEWS.rst
+
+.. _

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/docker-compose.yml
----------------------------------------------------------------------
diff --git a/python/docker-compose.yml b/python/docker-compose.yml
new file mode 100644
index 0000000..bf398ec
--- /dev/null
+++ b/python/docker-compose.yml
@@ -0,0 +1,21 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+version: "3"
+services:
+  phoenix:
+    image: docker.oxygene.sk/lukas/python-phoenixdb/phoenix:${PHOENIX_VERSION:-4.11}
+    ports:
+      - "127.0.0.1:8765:8765"

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/examples/basic.py
----------------------------------------------------------------------
diff --git a/python/examples/basic.py b/python/examples/basic.py
new file mode 100755
index 0000000..4894d21
--- /dev/null
+++ b/python/examples/basic.py
@@ -0,0 +1,27 @@
+#!/usr/bin/env python
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import phoenixdb
+
+with phoenixdb.connect('http://localhost:8765/', autocommit=True) as connection:
+    with connection.cursor() as cursor:
+        cursor.execute("DROP TABLE IF EXISTS test")
+        cursor.execute("CREATE TABLE test (id INTEGER PRIMARY KEY, text VARCHAR)")
+        cursor.executemany("UPSERT INTO test VALUES (?, ?)", [[1, 'hello'], [2, 'world']])
+        cursor.execute("SELECT * FROM test ORDER BY id")
+        for row in cursor:
+            print(row)

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/examples/shell.py
----------------------------------------------------------------------
diff --git a/python/examples/shell.py b/python/examples/shell.py
new file mode 100755
index 0000000..820435e
--- /dev/null
+++ b/python/examples/shell.py
@@ -0,0 +1,33 @@
+#!/usr/bin/env python
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+import logging
+import argparse
+import sqlline
+
+parser = argparse.ArgumentParser()
+parser.add_argument('--debug', '-d', action='store_true')
+parser.add_argument('url')
+args = parser.parse_args()
+
+if args.debug:
+    logging.basicConfig(level=logging.DEBUG)
+
+with sqlline.SqlLine() as sqlline:
+    sqlline.connect('phoenixdb', args.url)
+    sqlline.connection.autocommit = True
+    sqlline.run()

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/gen-protobuf.sh
----------------------------------------------------------------------
diff --git a/python/gen-protobuf.sh b/python/gen-protobuf.sh
new file mode 100755
index 0000000..f483561
--- /dev/null
+++ b/python/gen-protobuf.sh
@@ -0,0 +1,38 @@
+#!/usr/bin/env bash
+
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+AVATICA_VER=rel/avatica-1.10.0
+
+set -e
+
+rm -rf avatica-tmp
+
+mkdir avatica-tmp
+cd avatica-tmp
+wget -O avatica.tar.gz https://github.com/apache/calcite-avatica/archive/$AVATICA_VER.tar.gz
+tar -x --strip-components=1 -f avatica.tar.gz
+
+cd ..
+rm -f phoenixdb/avatica/proto/*_pb2.py
+protoc --proto_path=avatica-tmp/core/src/main/protobuf/ --python_out=phoenixdb/avatica/proto avatica-tmp/core/src/main/protobuf/*.proto
+if [[ "$(uname)" == "Darwin" ]]; then
+  sed -i '' 's/import common_pb2/from . import common_pb2/' phoenixdb/avatica/proto/*_pb2.py
+else
+  sed -i 's/import common_pb2/from . import common_pb2/' phoenixdb/avatica/proto/*_pb2.py
+fi
+
+rm -rf avatica-tmp

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/phoenixdb/__init__.py
----------------------------------------------------------------------
diff --git a/python/phoenixdb/__init__.py b/python/phoenixdb/__init__.py
new file mode 100644
index 0000000..ae7dd39
--- /dev/null
+++ b/python/phoenixdb/__init__.py
@@ -0,0 +1,68 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from phoenixdb import errors, types
+from phoenixdb.avatica import AvaticaClient
+from phoenixdb.connection import Connection
+from phoenixdb.errors import *  # noqa: F401,F403
+from phoenixdb.types import *  # noqa: F401,F403
+
+__all__ = ['connect', 'apilevel', 'threadsafety', 'paramstyle'] + types.__all__ + errors.__all__
+
+
+apilevel = "2.0"
+"""
+This module supports the `DB API 2.0 interface <https://www.python.org/dev/peps/pep-0249/>`_.
+"""
+
+threadsafety = 1
+"""
+Multiple threads can share the module, but neither connections nor cursors.
+"""
+
+paramstyle = 'qmark'
+"""
+Parmetrized queries should use the question mark as a parameter placeholder.
+
+For example::
+
+ cursor.execute("SELECT * FROM table WHERE id = ?", [my_id])
+"""
+
+
+def connect(url, max_retries=None, **kwargs):
+    """Connects to a Phoenix query server.
+
+    :param url:
+        URL to the Phoenix query server, e.g. ``http://localhost:8765/``
+
+    :param autocommit:
+        Switch the connection to autocommit mode.
+
+    :param readonly:
+        Switch the connection to readonly mode.
+
+    :param max_retries:
+        The maximum number of retries in case there is a connection error.
+
+    :param cursor_factory:
+        If specified, the connection's :attr:`~phoenixdb.connection.Connection.cursor_factory` is set to it.
+
+    :returns:
+        :class:`~phoenixdb.connection.Connection` object.
+    """
+    client = AvaticaClient(url, max_retries=max_retries)
+    client.connect()
+    return Connection(client, **kwargs)

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/phoenixdb/avatica/__init__.py
----------------------------------------------------------------------
diff --git a/python/phoenixdb/avatica/__init__.py b/python/phoenixdb/avatica/__init__.py
new file mode 100644
index 0000000..53776d7
--- /dev/null
+++ b/python/phoenixdb/avatica/__init__.py
@@ -0,0 +1,16 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+from .client import AvaticaClient  # noqa: F401

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/phoenixdb/avatica/client.py
----------------------------------------------------------------------
diff --git a/python/phoenixdb/avatica/client.py b/python/phoenixdb/avatica/client.py
new file mode 100644
index 0000000..ea00631
--- /dev/null
+++ b/python/phoenixdb/avatica/client.py
@@ -0,0 +1,510 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+"""Implementation of the JSON-over-HTTP RPC protocol used by Avatica."""
+
+import re
+import socket
+import pprint
+import math
+import logging
+import time
+from phoenixdb import errors
+from phoenixdb.avatica.proto import requests_pb2, common_pb2, responses_pb2
+
+try:
+    import httplib
+except ImportError:
+    import http.client as httplib
+
+try:
+    import urlparse
+except ImportError:
+    import urllib.parse as urlparse
+
+try:
+    from HTMLParser import HTMLParser
+except ImportError:
+    from html.parser import HTMLParser
+
+__all__ = ['AvaticaClient']
+
+logger = logging.getLogger(__name__)
+
+
+class JettyErrorPageParser(HTMLParser):
+
+    def __init__(self):
+        HTMLParser.__init__(self)
+        self.path = []
+        self.title = []
+        self.message = []
+
+    def handle_starttag(self, tag, attrs):
+        self.path.append(tag)
+
+    def handle_endtag(self, tag):
+        self.path.pop()
+
+    def handle_data(self, data):
+        if len(self.path) > 2 and self.path[0] == 'html' and self.path[1] == 'body':
+            if len(self.path) == 3 and self.path[2] == 'h2':
+                self.title.append(data.strip())
+            elif len(self.path) == 4 and self.path[2] == 'p' and self.path[3] == 'pre':
+                self.message.append(data.strip())
+
+
+def parse_url(url):
+    url = urlparse.urlparse(url)
+    if not url.scheme and not url.netloc and url.path:
+        netloc = url.path
+        if ':' not in netloc:
+            netloc = '{}:8765'.format(netloc)
+        return urlparse.ParseResult('http', netloc, '/', '', '', '')
+    return url
+
+
+# Defined in phoenix-core/src/main/java/org/apache/phoenix/exception/SQLExceptionCode.java
+SQLSTATE_ERROR_CLASSES = [
+    ('08', errors.OperationalError),  # Connection Exception
+    ('22018', errors.IntegrityError),  # Constraint violatioin.
+    ('22', errors.DataError),  # Data Exception
+    ('23', errors.IntegrityError),  # Constraint Violation
+    ('24', errors.InternalError),  # Invalid Cursor State
+    ('25', errors.InternalError),  # Invalid Transaction State
+    ('42', errors.ProgrammingError),  # Syntax Error or Access Rule Violation
+    ('XLC', errors.OperationalError),  # Execution exceptions
+    ('INT', errors.InternalError),  # Phoenix internal error
+]
+
+# Relevant properties as defined by https://calcite.apache.org/avatica/docs/client_reference.html
+OPEN_CONNECTION_PROPERTIES = (
+    'user',  # User for the database connection
+    'password',  # Password for the user
+)
+
+
+def raise_sql_error(code, sqlstate, message):
+    for prefix, error_class in SQLSTATE_ERROR_CLASSES:
+        if sqlstate.startswith(prefix):
+            raise error_class(message, code, sqlstate)
+
+
+def parse_and_raise_sql_error(message):
+    match = re.findall(r'(?:([^ ]+): )?ERROR (\d+) \(([0-9A-Z]{5})\): (.*?) ->', message)
+    if match is not None and len(match):
+        exception, code, sqlstate, message = match[0]
+        raise_sql_error(int(code), sqlstate, message)
+
+
+def parse_error_page(html):
+    parser = JettyErrorPageParser()
+    parser.feed(html)
+    if parser.title == ['HTTP ERROR: 500']:
+        message = ' '.join(parser.message).strip()
+        parse_and_raise_sql_error(message)
+        raise errors.InternalError(message)
+
+
+def parse_error_protobuf(text):
+    message = common_pb2.WireMessage()
+    message.ParseFromString(text)
+
+    err = responses_pb2.ErrorResponse()
+    err.ParseFromString(message.wrapped_message)
+
+    parse_and_raise_sql_error(err.error_message)
+    raise_sql_error(err.error_code, err.sql_state, err.error_message)
+    raise errors.InternalError(err.error_message)
+
+
+class AvaticaClient(object):
+    """Client for Avatica's RPC server.
+
+    This exposes all low-level functionality that the Avatica
+    server provides, using the native terminology. You most likely
+    do not want to use this class directly, but rather get connect
+    to a server using :func:`phoenixdb.connect`.
+    """
+
+    def __init__(self, url, max_retries=None):
+        """Constructs a new client object.
+
+        :param url:
+            URL of an Avatica RPC server.
+        """
+        self.url = parse_url(url)
+        self.max_retries = max_retries if max_retries is not None else 3
+        self.connection = None
+
+    def connect(self):
+        """Opens a HTTP connection to the RPC server."""
+        logger.debug("Opening connection to %s:%s", self.url.hostname, self.url.port)
+        try:
+            self.connection = httplib.HTTPConnection(self.url.hostname, self.url.port)
+            self.connection.connect()
+        except (httplib.HTTPException, socket.error) as e:
+            raise errors.InterfaceError('Unable to connect to the specified service', e)
+
+    def close(self):
+        """Closes the HTTP connection to the RPC server."""
+        if self.connection is not None:
+            logger.debug("Closing connection to %s:%s", self.url.hostname, self.url.port)
+            try:
+                self.connection.close()
+            except httplib.HTTPException:
+                logger.warning("Error while closing connection", exc_info=True)
+            self.connection = None
+
+    def _post_request(self, body, headers):
+        retry_count = self.max_retries
+        while True:
+            logger.debug("POST %s %r %r", self.url.path, body, headers)
+            try:
+                self.connection.request('POST', self.url.path, body=body, headers=headers)
+                response = self.connection.getresponse()
+            except httplib.HTTPException as e:
+                if retry_count > 0:
+                    delay = math.exp(-retry_count)
+                    logger.debug("HTTP protocol error, will retry in %s seconds...", delay, exc_info=True)
+                    self.close()
+                    self.connect()
+                    time.sleep(delay)
+                    retry_count -= 1
+                    continue
+                raise errors.InterfaceError('RPC request failed', cause=e)
+            else:
+                if response.status == httplib.SERVICE_UNAVAILABLE:
+                    if retry_count > 0:
+                        delay = math.exp(-retry_count)
+                        logger.debug("Service unavailable, will retry in %s seconds...", delay, exc_info=True)
+                        time.sleep(delay)
+                        retry_count -= 1
+                        continue
+                return response
+
+    def _apply(self, request_data, expected_response_type=None):
+        logger.debug("Sending request\n%s", pprint.pformat(request_data))
+
+        request_name = request_data.__class__.__name__
+        message = common_pb2.WireMessage()
+        message.name = 'org.apache.calcite.avatica.proto.Requests${}'.format(request_name)
+        message.wrapped_message = request_data.SerializeToString()
+        body = message.SerializeToString()
+        headers = {'content-type': 'application/x-google-protobuf'}
+
+        response = self._post_request(body, headers)
+        response_body = response.read()
+
+        if response.status != httplib.OK:
+            logger.debug("Received response\n%s", response_body)
+            if b'<html>' in response_body:
+                parse_error_page(response_body)
+            else:
+                # assume the response is in protobuf format
+                parse_error_protobuf(response_body)
+            raise errors.InterfaceError('RPC request returned invalid status code', response.status)
+
+        message = common_pb2.WireMessage()
+        message.ParseFromString(response_body)
+
+        logger.debug("Received response\n%s", message)
+
+        if expected_response_type is None:
+            expected_response_type = request_name.replace('Request', 'Response')
+
+        expected_response_type = 'org.apache.calcite.avatica.proto.Responses$' + expected_response_type
+        if message.name != expected_response_type:
+            raise errors.InterfaceError('unexpected response type "{}"'.format(message.name))
+
+        return message.wrapped_message
+
+    def get_catalogs(self, connection_id):
+        request = requests_pb2.CatalogsRequest()
+        request.connection_id = connection_id
+        return self._apply(request)
+
+    def get_schemas(self, connection_id, catalog=None, schemaPattern=None):
+        request = requests_pb2.SchemasRequest()
+        request.connection_id = connection_id
+        if catalog is not None:
+            request.catalog = catalog
+        if schemaPattern is not None:
+            request.schema_pattern = schemaPattern
+        return self._apply(request)
+
+    def get_tables(self, connection_id, catalog=None, schemaPattern=None, tableNamePattern=None, typeList=None):
+        request = requests_pb2.TablesRequest()
+        request.connection_id = connection_id
+        if catalog is not None:
+            request.catalog = catalog
+        if schemaPattern is not None:
+            request.schema_pattern = schemaPattern
+        if tableNamePattern is not None:
+            request.table_name_pattern = tableNamePattern
+        if typeList is not None:
+            request.type_list = typeList
+        if typeList is not None:
+            request.type_list.extend(typeList)
+        request.has_type_list = typeList is not None
+        return self._apply(request)
+
+    def get_columns(self, connection_id, catalog=None, schemaPattern=None, tableNamePattern=None, columnNamePattern=None):
+        request = requests_pb2.ColumnsRequest()
+        request.connection_id = connection_id
+        if catalog is not None:
+            request.catalog = catalog
+        if schemaPattern is not None:
+            request.schema_pattern = schemaPattern
+        if tableNamePattern is not None:
+            request.table_name_pattern = tableNamePattern
+        if columnNamePattern is not None:
+            request.column_name_pattern = columnNamePattern
+        return self._apply(request)
+
+    def get_table_types(self, connection_id):
+        request = requests_pb2.TableTypesRequest()
+        request.connection_id = connection_id
+        return self._apply(request)
+
+    def get_type_info(self, connection_id):
+        request = requests_pb2.TypeInfoRequest()
+        request.connection_id = connection_id
+        return self._apply(request)
+
+    def connection_sync(self, connection_id, connProps=None):
+        """Synchronizes connection properties with the server.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param connProps:
+            Dictionary with the properties that should be changed.
+
+        :returns:
+            A ``common_pb2.ConnectionProperties`` object.
+        """
+        if connProps is None:
+            connProps = {}
+
+        request = requests_pb2.ConnectionSyncRequest()
+        request.connection_id = connection_id
+        request.conn_props.auto_commit = connProps.get('autoCommit', False)
+        request.conn_props.has_auto_commit = True
+        request.conn_props.read_only = connProps.get('readOnly', False)
+        request.conn_props.has_read_only = True
+        request.conn_props.transaction_isolation = connProps.get('transactionIsolation', 0)
+        request.conn_props.catalog = connProps.get('catalog', '')
+        request.conn_props.schema = connProps.get('schema', '')
+
+        response_data = self._apply(request)
+        response = responses_pb2.ConnectionSyncResponse()
+        response.ParseFromString(response_data)
+        return response.conn_props
+
+    def open_connection(self, connection_id, info=None):
+        """Opens a new connection.
+
+        :param connection_id:
+            ID of the connection to open.
+        """
+        request = requests_pb2.OpenConnectionRequest()
+        request.connection_id = connection_id
+        if info is not None:
+            # Info is a list of repeated pairs, setting a dict directly fails
+            for k, v in info.items():
+                request.info[k] = v
+
+        response_data = self._apply(request)
+        response = responses_pb2.OpenConnectionResponse()
+        response.ParseFromString(response_data)
+
+    def close_connection(self, connection_id):
+        """Closes a connection.
+
+        :param connection_id:
+            ID of the connection to close.
+        """
+        request = requests_pb2.CloseConnectionRequest()
+        request.connection_id = connection_id
+        self._apply(request)
+
+    def create_statement(self, connection_id):
+        """Creates a new statement.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :returns:
+            New statement ID.
+        """
+        request = requests_pb2.CreateStatementRequest()
+        request.connection_id = connection_id
+
+        response_data = self._apply(request)
+        response = responses_pb2.CreateStatementResponse()
+        response.ParseFromString(response_data)
+        return response.statement_id
+
+    def close_statement(self, connection_id, statement_id):
+        """Closes a statement.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param statement_id:
+            ID of the statement to close.
+        """
+        request = requests_pb2.CloseStatementRequest()
+        request.connection_id = connection_id
+        request.statement_id = statement_id
+
+        self._apply(request)
+
+    def prepare_and_execute(self, connection_id, statement_id, sql, max_rows_total=None, first_frame_max_size=None):
+        """Prepares and immediately executes a statement.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param statement_id:
+            ID of the statement to prepare.
+
+        :param sql:
+            SQL query.
+
+        :param max_rows_total:
+            The maximum number of rows that will be allowed for this query.
+
+        :param first_frame_max_size:
+            The maximum number of rows that will be returned in the first Frame returned for this query.
+
+        :returns:
+            Result set with the signature of the prepared statement and the first frame data.
+        """
+        request = requests_pb2.PrepareAndExecuteRequest()
+        request.connection_id = connection_id
+        request.statement_id = statement_id
+        request.sql = sql
+        if max_rows_total is not None:
+            request.max_rows_total = max_rows_total
+        if first_frame_max_size is not None:
+            request.first_frame_max_size = first_frame_max_size
+
+        response_data = self._apply(request, 'ExecuteResponse')
+        response = responses_pb2.ExecuteResponse()
+        response.ParseFromString(response_data)
+        return response.results
+
+    def prepare(self, connection_id, sql, max_rows_total=None):
+        """Prepares a statement.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param sql:
+            SQL query.
+
+        :param max_rows_total:
+            The maximum number of rows that will be allowed for this query.
+
+        :returns:
+            Signature of the prepared statement.
+        """
+        request = requests_pb2.PrepareRequest()
+        request.connection_id = connection_id
+        request.sql = sql
+        if max_rows_total is not None:
+            request.max_rows_total = max_rows_total
+
+        response_data = self._apply(request)
+        response = responses_pb2.PrepareResponse()
+        response.ParseFromString(response_data)
+        return response.statement
+
+    def execute(self, connection_id, statement_id, signature, parameter_values=None, first_frame_max_size=None):
+        """Returns a frame of rows.
+
+        The frame describes whether there may be another frame. If there is not
+        another frame, the current iteration is done when we have finished the
+        rows in the this frame.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param statement_id:
+            ID of the statement to fetch rows from.
+
+        :param signature:
+            common_pb2.Signature object
+
+        :param parameter_values:
+            A list of parameter values, if statement is to be executed; otherwise ``None``.
+
+        :param first_frame_max_size:
+            The maximum number of rows that will be returned in the first Frame returned for this query.
+
+        :returns:
+            Frame data, or ``None`` if there are no more.
+        """
+        request = requests_pb2.ExecuteRequest()
+        request.statementHandle.id = statement_id
+        request.statementHandle.connection_id = connection_id
+        request.statementHandle.signature.CopyFrom(signature)
+        if parameter_values is not None:
+            request.parameter_values.extend(parameter_values)
+            request.has_parameter_values = True
+        if first_frame_max_size is not None:
+            request.deprecated_first_frame_max_size = first_frame_max_size
+            request.first_frame_max_size = first_frame_max_size
+
+        response_data = self._apply(request)
+        response = responses_pb2.ExecuteResponse()
+        response.ParseFromString(response_data)
+        return response.results
+
+    def fetch(self, connection_id, statement_id, offset=0, frame_max_size=None):
+        """Returns a frame of rows.
+
+        The frame describes whether there may be another frame. If there is not
+        another frame, the current iteration is done when we have finished the
+        rows in the this frame.
+
+        :param connection_id:
+            ID of the current connection.
+
+        :param statement_id:
+            ID of the statement to fetch rows from.
+
+        :param offset:
+            Zero-based offset of first row in the requested frame.
+
+        :param frame_max_size:
+            Maximum number of rows to return; negative means no limit.
+
+        :returns:
+            Frame data, or ``None`` if there are no more.
+        """
+        request = requests_pb2.FetchRequest()
+        request.connection_id = connection_id
+        request.statement_id = statement_id
+        request.offset = offset
+        if frame_max_size is not None:
+            request.frame_max_size = frame_max_size
+
+        response_data = self._apply(request)
+        response = responses_pb2.FetchResponse()
+        response.ParseFromString(response_data)
+        return response.frame

http://git-wip-us.apache.org/repos/asf/phoenix/blob/d88e4972/python/phoenixdb/avatica/proto/__init__.py
----------------------------------------------------------------------
diff --git a/python/phoenixdb/avatica/proto/__init__.py b/python/phoenixdb/avatica/proto/__init__.py
new file mode 100644
index 0000000..e69de29


Mime
View raw message