https://github.com/firebolt-db/firebolt-python-sdk
The Python SDK for Firebolt
https://github.com/firebolt-db/firebolt-python-sdk
firebolt python sdk
Last synced: about 1 month ago
JSON representation
The Python SDK for Firebolt
- Host: GitHub
- URL: https://github.com/firebolt-db/firebolt-python-sdk
- Owner: firebolt-db
- License: apache-2.0
- Created: 2021-08-04T22:29:23.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-04-29T16:04:02.000Z (about 1 month ago)
- Last Synced: 2025-04-29T21:18:05.875Z (about 1 month ago)
- Topics: firebolt, python, sdk
- Language: Python
- Homepage:
- Size: 533 MB
- Stars: 15
- Watchers: 6
- Forks: 10
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.MD
- License: LICENSE
- Codeowners: .github/CODEOWNERS
Awesome Lists containing this project
README
# firebolt-sdk
[](https://github.com/firebolt-db/firebolt-python-sdk/actions/workflows/nightly.yml)
[](https://github.com/firebolt-db/firebolt-python-sdk/actions/workflows/unit-tests.yml)
[](https://github.com/firebolt-db/firebolt-python-sdk/actions/workflows/code-check.yml)
[](https://github.com/firebolt-db/firebolt-python-sdk/actions/workflows/security-scan.yml)
[](https://github.com/firebolt-db/firebolt-python-sdk/actions/workflows/integration-tests.yml)
### Installation
* Requires Python `>=3.8`
* `pip install "firebolt-sdk>=1.0.0a1"`## Documentation
For reference and tutorials, see the [Firebolt Python SDK reference](https://python.docs.firebolt.io/sdk_documenation/latest/).
## 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](https://www.python.org/dev/peps/pep-0249) for the DB API reference and specifications. An example [jupyter notebook](https://github.com/firebolt-db/firebolt-sdk/tree/main/examples/dbapi.ipynb) 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](https://peps.python.org/pep-0249/#threadsafety).### Some keywords are not allowed as SET parameters
```Python
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](https://pypi.org/project/ciso8601/) package. In order to install firebolt-sdk with `ciso8601` support, run `pip install "firebolt-sdk[ciso8601]"`## Contributing
See: [CONTRIBUTING.MD](https://github.com/firebolt-db/firebolt-sdk/tree/main/CONTRIBUTING.MD)
## License
The Firebolt DB API is licensed under the [Apache License Version 2.0](https://github.com/firebolt-db/firebolt-sdk/tree/main/LICENSE) software license.