semvec/pypi-packages huggingface dataset:
rawscli 0.9.7
A simple tool to manage your AWS credentials
License: MIT
Requires Python: >=3.9

[![build status](https://github.com/andzhi4/raws/actions/workflows/matrix-test.yml/badge.svg)](https://github.com/andzhi4/raws/actions/workflows/matrix-test.yml)
# RAWS

RAWS is a simple AWS Profile Manager with a command-line interface that helps you easily manipulate AWS profiles on your local machine.
RAWS will lookup location of your AWS credentials file through environment variable `AWS_CREDS_FILE`. If the variable is not set, it will default to `~/.aws/credentials`. You can also override the file location by specifing `--creds_file` argument.

## Installation

You can install the raws by cloning the repository and running pip install:
```shell
git clone git@github.com:andzhi4/raws
cd raws && pip install .
```

Using PyPi:
```shell
pip install rawscli
```

This will display a list of available commands:
`raws -h`

### Available commands

* `add`: Add a new AWS profile.
* `delete`: Delete an existing AWS profile.
* `list`: List all available AWS profiles.
* `show`: Show detailed information on specified profile
* `setdefault`: Make specified profile default
* `rename`: Rename a profile
* `backup`: backup credentials file (optionally provide location)
* `restore`: restore from a location or from latest backup
* `version`: show current version and exit


## Examples

Here are a few examples of how to use the AWS Profile Manager:

Show all available profiles:
```shell
raws list 
```
or
```shell
raws ls
```

Show details of the `personal` profile:
```shell
raws show personal
```

Add a new profile from clipboard (copied from AWS SSO page), set as default, rename to `personal`:
```shell
raws add cb --setdefault --rename_to=personal
```

Rename profile `busieness_13123` to `work`:
```shell
raws rename busieness_13123 work
```

Set `personal` profile as default:
```shell
raws setdef personal
```

Backup current credentials file:
```shell
raws backup
```

Restore from the latest backup:
```shell
raws restore --latest
```

List all profiles in a backup file located in /home/user/backup/creds.bkp
```shell
raws --creds_file=/home/user/backup/creds.bkp ls
```

## Contributing

If you find a bug or have an idea for a new feature, feel free to create an issue or submit a pull request.

## License

RAWS is released under the MIT License.
dataclass-persistence 0.3.7
Persists information contained in dataclasses.
License: MIT
Requires Python: >=3.10.0


dataclass-persistence
==========================

This program can be used to make dataclasses persistent by adding store and load functionality.
The dataclass is stored in .json format which is by default compressed inside of a .zip file.

What makes dataclass-persistence special?
   * Support for numpy arrays
   * Support for nested dataclasses
   * Human readable storage format with small file size


Usage
-----
Let your dataclass inherit from :code:`Persistent`.
Then the dataclass can be stored on disk using :code:`.store()` and loaded from disk using
:code:`.load()`.

In the example below, we create an instance of dataclass, which is stored to and loaded from disk.

.. code-block:: python

    from dataclass_persistence import Persistent
    from dataclasses import dataclass
    import numpy as np


    @dataclass
    class SomeData(Persistent):
        parameter_a: str
        array: np.ndarray


    data = SomeData('my_string', np.array([0, 0]))
    file = 'my_file'
    data.store(file)
    data_reconstructed = SomeData.load(file)

On disk the code above produces `my_file.zip` which contains `my_file.json`:

.. code-block:: json

    {
      "parameter_a": "my_string",
      "array": {"data": [0, 0], "dtype": "int32"}
    }