Skip to main content

Pure Python Quickstep Driver

Project description

# PyQuickstep The Quickstep Python API was designed and developed based on the guidelines from [Python Database API Specification](https://www.python.org/dev/peps/pep-0249/). The API is used as a access layer for [Quickstep DBMS](https://github.com/apache/incubator-quickstep). The API contains the following modules:

  • Connection – An instance of connection supports two methods.
    • close() – closes the connection between API and Quickstep instance.

    • cursor() – Gives a cursor instance to interact with Quickstep database instance.

  • Cursor – An instance of cursor is used to manage the context of operations to the Quickstep database.
    • close() – Closes the cursor and will be not usable after this.

    • execute() – Executes the given query and returns result after formatting to tuples.

    • fetchone() – fetches one row and moves the cursor to next row.

    • fetchmany() – fetches mentioned number of rows and moves the cursor to next row if available.

    • fetchall() – fetches all the rows and moves the cursor to the end.

  • Error – Defines the different types of errors and warnings that API can produce.

  • QuickstepResult – Parses the query result into tuples.

  • GPRC files – Generated files to establish connection with the Quickstep database.

## Installation:

PyQuickstep is uploaded to PyPI. It can be installed with the following command:

$python2 -m pip install pyquickstep

## Example:

The following example makes use of simple table. Create the table in Quickstep database.

` CREATE TABLE Weather (cid INTEGER, recordDate DATE, highTemperature FLOAT, lowTemperature FLOAT); INSERT INTO Weather VALUES (1, '2015-11-1', 50, 30); INSERT INTO Weather VALUES (1, '2015-11-2', 51, 32); INSERT INTO Weather VALUES (2, '2015-11-1', 60, 50); `

` import pyquickstep conn = pyquickstep.Connect('localhost', '3000') cursor = conn.cursor() result = cursor.execute("select * from weather") print cursor.fetchone() print cursor.fetchmany() print cursor.fetchall() `

This example will print: ` ('1', '2015-11-01', '50', '30') (('1', '2015-11-02', '51', '32'),) (('2', '2015-11-01', '60', '50'),) `

## License

PyQuickstep is licensed under GNU GPLv3. Please see LICENSE

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

PyQuickstep-1.0.6.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyQuickstep-1.0.6-py2-none-any.whl (22.0 kB view details)

Uploaded Python 2

File details

Details for the file PyQuickstep-1.0.6.tar.gz.

File metadata

  • Download URL: PyQuickstep-1.0.6.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for PyQuickstep-1.0.6.tar.gz
Algorithm Hash digest
SHA256 58a814c77167b137a29de3156bf704fc37ddd623f29bd090c653c5103e4a327b
MD5 e1fa7586673c2c6091076550fa36da67
BLAKE2b-256 8e7f8860f01f0aaba6e237df98a47e2fa615a171d9b1cd687fc0527152da8da4

See more details on using hashes here.

File details

Details for the file PyQuickstep-1.0.6-py2-none-any.whl.

File metadata

  • Download URL: PyQuickstep-1.0.6-py2-none-any.whl
  • Upload date:
  • Size: 22.0 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/2.7.15

File hashes

Hashes for PyQuickstep-1.0.6-py2-none-any.whl
Algorithm Hash digest
SHA256 9c55267d510453152ebd5c68a16acae4ce934fd812c1e6e76e46917163959d64
MD5 e12e80bf64ebfa623a02b6476d4e7544
BLAKE2b-256 ee5ad717d1d2ac543f665bb667c4907a8169bfc9ef5ddc6602be84d689309214

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page