Metadata-Version: 2.1
Name: exasol-notebook-connector
Version: 0.4.0
Summary: Components, tools, APIs, and configurations in order to connect Jupyter notebooks to Exasol and various other systems.
License: MIT
Author: Christoph Kuhnke
Author-email: christoph.kuhnke@exasol.com
Maintainer: Christoph Kuhnke
Maintainer-email: christoph.kuhnke@exasol.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Jupyter :: JupyterLab :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Security :: Cryptography
Requires-Dist: GitPython (>=2.1.0)
Requires-Dist: exasol-bucketfs (>=0.9.0,<1.0.0)
Requires-Dist: exasol-integration-test-docker-environment (>=2.0.0)
Requires-Dist: exasol-saas-api (>=0.9.0,<1.0.0)
Requires-Dist: exasol-sagemaker-extension (>=0.10.0,<1.0.0)
Requires-Dist: exasol-script-languages-container-tool (>=0.19.0)
Requires-Dist: exasol-transformers-extension (>=2.0.0,<3.0.0)
Requires-Dist: ibis-framework[exasol] (>=9.1.0,<10.0.0)
Requires-Dist: ifaddr (>=0.2.0,<0.3.0)
Requires-Dist: pyexasol (>=0.24.0)
Requires-Dist: requests (>=2.31.0,<2.32.0)
Requires-Dist: sqlalchemy-exasol (>=4.6.0)
Requires-Dist: sqlcipher3 (>=0.5.0); sys_platform == "darwin"
Requires-Dist: sqlcipher3-binary (>=0.5.0); sys_platform == "linux"
Requires-Dist: transformers[torch] (>=4.36.2,<5.0.0)
Requires-Dist: types-requests (>=2.31.0.6,<3.0.0.0)
Project-URL: Documentation, https://github.io/exasol/notebook-connector
Project-URL: Homepage, https://github.io/exasol/notebook-connector
Project-URL: Issues, https://github.io/exasol/notebook-connector/issues
Project-URL: Source, https://github.io/exasol/notebook-connector
Description-Content-Type: text/markdown

# Exasol Notebook Connector

Connection configuration management and additional tools for Jupyter notebook applications provided by Exasol company.

[![PyPI Version](https://img.shields.io/pypi/v/exasol-notebook-connector)](https://pypi.org/project/exasol-notebook-connector/)
[![License](https://img.shields.io/pypi/l/exasol-notebook-connector)](https://opensource.org/licenses/MIT)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/exasol-notebook-connector)](https://pypi.org/project/exasol-notebook-connector)
[![Last Commit](https://img.shields.io/github/last-commit/exasol/notebook-connector)](https://pypi.org/project/exasol-notebook-connector/)

## Features

Exasol Notebook Connector (ENC) currently contains a **Secret Store** that can be used in Jupyter notebook applications to store arbitrary credentials and configuration items, such as user names, passwords, URLs, etc.

By that users of such notebook applications
* need to enter their credentials and configuration items only once
* can store them in a secure, encrypted, and persistent file based on SQLite and [coleifer/sqlcipher3](https://github.com/coleifer/sqlcipher3)
* can use these credentials and configuration items in their notebook applications

## Usage

```python
from pathlib import Path
from exasol.nb_connector.secret_store import Secrets

file = "password_db.sqlite"
secrets = Secrets(Path(file), "my secret password")
key = "my key"
secrets.save(key, "my value")
value = secrets.get(key)
```

#### Constraints and Special Situations

* If file does not exist then SecretStore will create it.
* If password is wrong then SecretStore will throw an exception.
* If file contains key from a session in the past then method `secrets.save()` will overwrite the value for this key.
* If key is not contained in file then SecretStore returns `None`.
* Saving multiple keys can be chained: `secrets.save("key-1", "A").save("key-2", "B")`

