Skip to content

Commit

Permalink
Documentation/#16 add user guide (#18)
Browse files Browse the repository at this point in the history
* Updated README.md.

* Added usage instructions for secret store

* Fixed review findings
  • Loading branch information
ckunki authored Oct 31, 2023
1 parent d15a333 commit 67374ac
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,23 @@ 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 exasol.secret_store import Secrets

file = "password_db.sqlite"
secrets = Secrets(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")`
9 changes: 9 additions & 0 deletions doc/changes/changes_0.2.0.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Exasol Notebook Connector 0.2.0, released t.b.d.

## Summary

This release updates README file.

## Changes

* #16: Added usage instructions for secret store

0 comments on commit 67374ac

Please sign in to comment.