Skip to content

Commit 4f189ba

Browse files
committed
add details about credentials configuration in README file
1 parent 37ae04e commit 4f189ba

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,36 @@ To install the extension, execute:
1919
pip install jupyter_drives
2020
```
2121

22+
## Configure Credentials
23+
24+
To begin using the extension and gain access to your drives, you need to configure your user credentials generated by the provider (e.g.: `access_key`, `secret-access-key` and if applicable `session_token`).
25+
26+
For those working with `S3` drives using the `AWS` CLI, the credentials will be automatically extracted from `~/.aws/credentials`. There is nothing that needs to be done on your side.
27+
28+
>Note: This is only applicable for Linux or macOS `AWS` CLI users. In case you are using the `AWS` CLI from Windows, you can use the custom file path configuration with `C:\Users\USERNAME\.aws\credentials`. You can read more about this [here](https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-configure.html).
29+
30+
### Configuration file
31+
Otherwise, you can add your credentials to the server configuration file. Create a `jupyter_notebook_config.py` file in one of the
32+
[Jupyter config directories](https://jupyter.readthedocs.io/en/latest/use/jupyter-directories.html#id1),
33+
for example: `~/.jupyter/jupyter_notebook_config.py`, and specify your long-term or short-term credentials.
34+
35+
```python
36+
c = get_config()
37+
38+
c.DrivesConfig.access_key_id = "<AWS Access Key ID / IAM Access Key ID>"
39+
c.DrivesConfig.secret_access_key = "<AWS Secret Access Key / IAM Secret>"
40+
c.DrivesConfig.session_token = "<AWS Session Token / IAM Session Token>"
41+
```
42+
43+
### Custom file path containig credentials
44+
You can also just specify the location of a local file which contains your credentials. The `acccess_key`, `secret_access_key` and if applicable the `session_token` will be automatically extracted from there.
45+
46+
```python
47+
c = get_config()
48+
49+
c.DrivesConfig.custom_credentials_path = "path/to/file/containing/credentials"
50+
```
51+
2252
## Uninstall
2353

2454
To remove the extension, execute:

0 commit comments

Comments
 (0)