Metadata-Version: 2.1
Name: jawsume
Version: 0.1.0
Summary: Use AWSume in Jupyter
Author-email: Franz Diebold <franz@diebold.io>
License: MIT License
        
        Copyright (c) 2022 Franz Diebold
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/FranzDiebold/jawsume
Project-URL: Repository, https://github.com/FranzDiebold/jawsume
Keywords: jupyter,awsume,aws
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Provides-Extra: build
License-File: LICENSE

# JAWSume

[![PyPi](https://img.shields.io/pypi/v/jawsume)](https://pypi.org/project/jawsume/)
[![CI/CD](https://github.com/FranzDiebold/jawsume/actions/workflows/ci.yml/badge.svg)](https://github.com/FranzDiebold/jawsume/actions/workflows/ci.yml)

Use [AWSume](https://awsu.me/) in [Jupyter](https://jupyter.org/) to access [AWS](https://aws.amazon.com/) resources.

## Installation

```bash
$ pip install jawsume
```

## Usage

```python
from jawsume import jawsume

jawsume("<profile-name>")
```

You will be prompted for the MFA token.

Just like [AWSume](https://awsu.me/), this will set the following environment variables:

- `AWS_ACCESS_KEY_ID`
- `AWS_SECRET_ACCESS_KEY`
- `AWS_SESSION_TOKEN`
- `AWS_REGION`
- `AWSUME_PROFILE`
- `AWSUME_EXPIRATION`

### Non-interactive mode

You can also directly pass the MFA code:

```python
jawsume("<profile-name>", "<mfa-token>")
```

### What can I do then?

You can then for instance read [Apache Parquet](https://parquet.apache.org/) files from [Amazon S3](https://aws.amazon.com/s3/).

```python
import pandas as pd

df = pd.read_parquet("s3://<bucket-name>/<path-name>.parquet/")
```
