semvec/pypi-packages huggingface dataset:
shipyard-motherduck 0.1.2
A local client for working with Python and MotherDuck
Requires Python: <4.0,>=3.9

# shipyard-motherduck 

### Installation 
```bash
python3 -m pip install shipyard-motherduck
```

### Usage 

In order to initalize the client, pass the access token to the `MotherDuckClient` object:

```python3
client = MotherDuckClient("<access_token>")
```

Additionally you can connect to a specifc database by supplying the database to the client:

```python3
client = MotherDuckClient("<access_token>", database = 'my_db')

```


### Loading Data 

The `upload` method allows for a quick upload of a file to a table in MotherDuck. If the table does not exist,
it will be created. The target table can also be appended to by setting the `insert_method` to 'append'. 

Example: 

```python3
client.upload(table_name = 'my_new_table', file_path = 'my_data.csv', insert_method = 'replace')

```

### Fetching Data
The `fetch` method returns the results of a SQL query as a `DuckDBPyRelation` type. From there, it can be converted to a DataFrame or 
written to a file. 

Example:
```python3
results = client.fetch('select * from my_new_table')
df = results.to_df()
```


### Executing a Query 
The `execute_query` method executes a SQL query in MotherDuck. The difference between this and the `fetch` method is that this 
does not return results and is intended for `ALTER, CREATE, DROP` and other DDL queries. 

Example:
```python3 
client.execute_query('DROP TABLE my_new_table')
```
aws-ar 1.9
Command Line Utility for Configuring Assumed AWS IAM Role Credentials

AWS-AR: AWS Assume Role CLI Utility
===================================

AWS-AR is a command-line utility that simplifies the process of configuring assumed AWS IAM role credentials in your local AWS configuration files `($HOME/.aws/config and $HOME/.aws/credentials)`. This tool allows you to assume an IAM role and automatically update your AWS CLI configuration with the temporary security credentials obtained from the assumed role.

### Features

*   Assume an AWS IAM role and obtain temporary security credentials.
*   Update AWS CLI configuration files ($HOME/.aws/config and $HOME/.aws/credentials) with the assumed role credentials.
*   Supports specifying the ARN of the IAM role, AWS CLI profile, and optionally creating a new profile for the assumed role.

### Installation

You can install AWS-AR using pip:

    pip install aws-ar
    

### Usage

Assuming an IAM role and updating AWS CLI configuration:

    aws-ar --assume-role-arn <role_arn> --profile <existing_profile> --set-new-profile <new_profile>
    

*   : The ARN of the IAM role to assume.
*   : The name of the existing AWS CLI profile to use for assuming the role.
*   : The name of the new profile to be created with the assumed role credentials.

### Example:

    aws-ar --assume-role-arn arn:aws:iam::123456789012:role/MyRole --profile default --set-new-profile assumed-role
    

This command assumes the IAM role MyRole, uses the default AWS CLI profile for authentication, and creates a new profile named assumed-role with the assumed role credentials.