arn-0.1.5
توضیحات
A Python library for parsing AWS ARNs
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | arn-0.1.5 |
| نام | arn |
| نسخه کتابخانه | 0.1.5 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | - |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | - |
| آدرس اینترنتی | https://pypi.org/project/arn/ |
| مجوز | - |
# arn
A Python library for parsing [AWS ARNs](https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html).
## Installation
To install, just run
```bash
pip install arn
```
or add the library to your `setup.py` / `requirements.txt`.
## Usage
Given an ARN for a particular AWS resource, parse it with the appropriate class:
```python
from arn.elbv2 import TargetGroupArn
target_group_arn_str = "arn:aws:elasticloadbalancing:us-east-1:123456789012:targetgroup/foo-bar/abc123"
target_group_arn = TargetGroupArn(target_group_arn_str)
# use the ARN instance's __str__ to format the ARN back into a string
assert str(target_group_arn) == target_group_arn_str
# common attributes
assert target_group_arn.partition == "aws"
assert target_group_arn.service == "elasticloadbalancing"
assert target_group_arn.region == "us-east-1"
assert target_group_arn.account == "123456789012"
# attributes specific to the type of AWS resource
assert target_group_arn.name == "foo-bar"
assert target_group_arn.id == "abc123"
```
نیازمندی
| مقدار | نام |
|---|---|
| - | dataclasses |
| ==19.3b0 | black |
| ==3.7.8 | flake8 |
| ==1.3.0 | invoke |
| ==4.3.21 | isort |
| ==5.2.1 | pytest |
| ==2.8.1 | pytest-cov |
| ==4.2.0 | pytest-watch |
| ==2.0.0 | twine |
| ==0.34.2 | wheel |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.6 | Python |
نحوه نصب
نصب پکیج whl arn-0.1.5:
pip install arn-0.1.5.whl
نصب پکیج tar.gz arn-0.1.5:
pip install arn-0.1.5.tar.gz