GithubHelp home page GithubHelp logo

firebolt-db / firebolt-python-sdk Goto Github PK

View Code? Open in Web Editor NEW
13.0 7.0 9.0 238.15 MB

The Python SDK for Firebolt

License: Apache License 2.0

Python 99.77% Makefile 0.10% Batchfile 0.13%
python sdk firebolt

firebolt-python-sdk's Introduction

firebolt-sdk

Nightly code check Unit tests Code quality checks Firebolt Security Scan Integration tests Coverage

Installation

  • Requires Python >=3.8
  • pip install "firebolt-sdk>=1.0.0a1"

Documentation

For reference and tutorials, see the Firebolt Python SDK reference.

Connection parameters

These parameters are used to connect to a Firebolt database:

  • account_name - name of firebolt account
  • client_id - credentials client id
  • cliend_secret - credentials client secret
  • database [Optional] - name of the database to connect to
  • engine_name [Optional] - name of the engine to connect to

Examples

See PEP-249 for the DB API reference and specifications. An example jupyter notebook is included to illustrate the use of the Firebolt API.

Special considerations

Cursor objects should not be shared between threads

Cursor is not thread-safe and should not be shared across threads. In a multi-threaded environment you can share a Connection, but each thread would need to keep its own Cursor. This corresponds to a thread safety 2 in the DBApi specification.

Some keywords are not allowed as SET parameters

cursor.execute("SET parameter=value")

This will error out if you try to set account_id, output_format, database, engine. These are special keywords that should not be set directly. To switch between databases and engines use USE DATABASE/ENGINE.

Optional features

Faster datetime with ciso8601

By default, firebolt-sdk uses datetime module to parse date and datetime values, which might be slow for a large amount of operations. In order to speed up datetime operations, it's possible to use ciso8601 package. In order to install firebolt-sdk with ciso8601 support, run pip install "firebolt-sdk[ciso8601]"

Contributing

See: CONTRIBUTING.MD

License

The Firebolt DB API is licensed under the Apache License Version 2.0 software license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.