phoenixdb is a Python library for accessing the
Phoenix SQL database
using the
remote query server introduced
in Phoenix 4.4. The library implements the
standard DB API 2.0 interface,
which should be familiar to most Python programmers.
Example usage:
import phoenixdb
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()