semvec/pypi-packages huggingface dataset:
poetry-aws-plugin 0.1.12
A poetry plugin to help with AWS CodeArtifact authorization automatically
License: MIT
Requires Python: <4.0,>=3.10
Keywords: aws, codeartifact, poetry

# Poetry AWS Plugin

This is a poetry plugin to help with AWS CodeArtifact authorization by automatically getting the authorization token.

When installing or publishing packages through poetry, the plugin will check whether the command requires CodeArtifact authorization, and if so, adds it automatically.

The plugin will try two methods of authorization, in this order:

1. Use AWS credentials to run `sts.AssumeRole`, then use that role to run `codeartifact.GetAuthorizationToken`.
2. Use AWS credentials to run `codeartifact.GetAuthorizationToken`.

## Installation

To install the plugin

```
poetry self add poetry-aws-plugin
```

To uninstall the plugin

```
poetry self remove poetry-aws-plugin
```

## Usage

You must ensure that your AWS credentials are configured and discoverable by `boto3`. The [`boto3` documentation](https://boto3.amazonaws.com/v1/documentation/api/latest/guide/credentials.html#configuring-credentials) has details on how to configure your credentials and the order in which they searched.

When poetry runs a command that uses CodeArtifact, the plugin will automatically check whether the command needs authorization, and if so, requests a CodeArtifact authorization token and adds it to the command.

Your AWS credentials must be authorized to do atleast one of the following:

1. Run [`codeartifact.GetAuthorizationToken`](https://docs.aws.amazon.com/cli/latest/reference/codeartifact/get-authorization-token.html).
2. Run [`sts.AssumeRole`](https://docs.aws.amazon.com/cli/latest/reference/sts/assume-role.html) to assume a role with authorization to run [`codeartifact.GetAuthorizationToken`](https://docs.aws.amazon.com/cli/latest/reference/codeartifact/get-authorization-token.html).

**To use IAM roles to authorize, set the environment variable `POETRY_AWS_PLUGIN_ROLE_ARN` to the role's ARN before running any poetry commands**.

For example:

```bash
POETRY_AWS_PLUGIN_ROLE_ARN='arn:aws:codeartifact:<region>:<account-id>:repository/<domain>/<domain-owner>/<repository>' poetry install
```

or

```bash
echo "export POETRY_AWS_PLUGIN_ROLE_ARN='arn:aws:codeartifact:<region>:<account-id>:repository/<domain>/<domain-owner>/<repository>'" >> ~/.bashrc
source ~/.bashrc
poetry install
```

You can find more details in AWS's [CodeArtifact authentication and tokens documentation](https://docs.aws.amazon.com/codeartifact/latest/ug/tokens-authentication.html) and [CodeArtifact IAM documentation](https://docs.aws.amazon.com/codeartifact/latest/ug/security_iam_service-with-iam.html).

# Misc

You can also authorize by setting the environment variable `POETRY_AWS_PLUGIN_AUTH_TOKEN` to the CodeArtifact authorization token. This may be useful in CI/CD pipelines and reducing poetry configuration.

For example:

```bash
POETRY_AWS_PLUGIN_AUTH_TOKEN='<codeartifact-authorization-token>' poetry install
```
cyzutils 0.0.5
my utils
License: MIT
Requires Python: >=3.6

### Install

```bash
pip install cyzutils
```

### Usage

Send email

```python
# mail
from cyzutils import send_mail
send_mail('subject', 'content', 'xxxxxxx@xxx.xx')
send_mail('subject', 'content') # send to myself
```

---

Run python file with cmd

Each command line parameter needs to be given as a list or a specific value

No limit on the number of command line parameters

```python
# run python cmd
from cyzutils import run_py
run_py(fail_path, arg1_name=arg1_list, arg2_name=arg2_list)
# eg.
file_path = 'test/test.py'
test1 = [1, 2]
test2 = [3, 4]
test3 = [5, 6]
run_py(file_path, arg1=test1, arg2=test2, arg3=test3)
```

### 打包上传 pypi 命令

```shell
pip install build

python -m build

pip install twine

twine check dist/*

twine upload dist/*
```

https://juejin.cn/post/7053009657371033630