better-aws-tags 0.2.0__tar.gz → 0.4.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- better_aws_tags-0.4.0/.github/workflows/release.yml +23 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/.gitignore +3 -2
- better_aws_tags-0.4.0/CHANGELOG.md +15 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/Makefile +1 -1
- better_aws_tags-0.4.0/PKG-INFO +31 -0
- better_aws_tags-0.4.0/README.md +22 -0
- better_aws_tags-0.4.0/scratchpad/.gitignore +1 -0
- better_aws_tags-0.4.0/scratchpad/arn/.gitignore +3 -0
- better_aws_tags-0.4.0/scratchpad/arn/Makefile +16 -0
- better_aws_tags-0.4.0/scratchpad/arn/arn_patterns.py +2797 -0
- better_aws_tags-0.4.0/scratchpad/arn/arn_patterns_test.py +203 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_01_aws_services.py +57 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_02_aws_resources.py +88 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_03_aws_tag_actions.py +112 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_04_arn_index.py +77 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_05_arn_matcher.py +92 -0
- better_aws_tags-0.4.0/scratchpad/arn/stage_06_arn_regex.py +213 -0
- better_aws_tags-0.4.0/scratchpad/tags/aws_cloudformation.py +47 -0
- better_aws_tags-0.4.0/scratchpad/tags/aws_services.py +30 -0
- better_aws_tags-0.4.0/scratchpad/tags/mapping_resource_tagging.py +110 -0
- better_aws_tags-0.4.0/scratchpad/tags/mapping_resources.py +57 -0
- better_aws_tags-0.4.0/scratchpad/tags/mapping_services.py +292 -0
- better_aws_tags-0.4.0/scratchpad/tags/mapping_services_next.py +88 -0
- better_aws_tags-0.4.0/scratchpad/tags/tagging_apis.py +99 -0
- better_aws_tags-0.4.0/scratchpad/tags/tagging_resources.py +88 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/src/better_aws_tags/__init__.py +1 -1
- better_aws_tags-0.4.0/src/better_aws_tags/arnmatch/__init__.py +108 -0
- better_aws_tags-0.4.0/src/better_aws_tags/arnmatch/patterns.py +2797 -0
- better_aws_tags-0.4.0/src/better_aws_tags/arnparse.py +147 -0
- better_aws_tags-0.4.0/src/better_aws_tags/handlers.py +139 -0
- better_aws_tags-0.4.0/src/better_aws_tags/tags.py +45 -0
- better_aws_tags-0.4.0/tests/test_arnmatch.py +403 -0
- better_aws_tags-0.4.0/tests/test_arnparse.py +427 -0
- better_aws_tags-0.2.0/.claude/settings.local.json +0 -16
- better_aws_tags-0.2.0/PKG-INFO +0 -18
- better_aws_tags-0.2.0/README.md +0 -9
- better_aws_tags-0.2.0/src/better_aws_tags/tags.py +0 -39
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/.python-version +0 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/pyproject.toml +0 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/tests/test_import.py +0 -0
- {better_aws_tags-0.2.0 → better_aws_tags-0.4.0}/uv.lock +0 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
name: Release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- "v*"
|
|
7
|
+
|
|
8
|
+
jobs:
|
|
9
|
+
release:
|
|
10
|
+
runs-on: ubuntu-latest
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
id-token: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v4
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v5
|
|
18
|
+
|
|
19
|
+
- name: Build package
|
|
20
|
+
run: uv build
|
|
21
|
+
|
|
22
|
+
- name: Publish to PyPI
|
|
23
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
debug_*.py
|
|
2
|
+
*.xlsx
|
|
2
3
|
|
|
3
4
|
### Python
|
|
4
5
|
|
|
@@ -199,9 +200,9 @@ cython_debug/
|
|
|
199
200
|
.abstra/
|
|
200
201
|
|
|
201
202
|
# Visual Studio Code
|
|
202
|
-
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
203
|
+
# Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
|
|
203
204
|
# that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
|
|
204
|
-
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
205
|
+
# and can be added to the global gitignore or merged into this file. However, if you prefer,
|
|
205
206
|
# you could uncomment the following to ignore the entire vscode folder
|
|
206
207
|
# .vscode/
|
|
207
208
|
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 0.4.0
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- New `arnmatch` module for ARN pattern matching using regex patterns from AWS documentation
|
|
8
|
+
- `arnmatch(arn)` function returns `ARNMatch` with parsed ARN components
|
|
9
|
+
- `ARNMatch.resource_id` and `ARNMatch.resource_name` heuristics for extracting resource identifiers
|
|
10
|
+
- Support for Resource Explorer type aliases (handles naming differences between AWS docs and Resource Explorer)
|
|
11
|
+
- 2080 ARN patterns covering 355 AWS services
|
|
12
|
+
|
|
13
|
+
## 0.3.1
|
|
14
|
+
|
|
15
|
+
- Initial release with `get_tags` and `set_tags` functions
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: better-aws-tags
|
|
3
|
+
Version: 0.4.0
|
|
4
|
+
Summary: A unified Python interface for managing AWS resource tags
|
|
5
|
+
Author-email: Andrey Gubarev <andrey@andreygubarev.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Requires-Dist: boto3~=1.0
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
|
|
10
|
+
# better-aws-tags
|
|
11
|
+
|
|
12
|
+
A unified Python interface for managing AWS resource tags.
|
|
13
|
+
|
|
14
|
+
AWS provides multiple tagging APIs across services, including the Resource Groups Tagging API and service-specific implementations such as EC2, S3, and IAM. This library abstracts these differences behind a single API that accepts any valid ARN and handles service routing, tag validation, and error reporting automatically.
|
|
15
|
+
|
|
16
|
+
## Getting Started
|
|
17
|
+
|
|
18
|
+
```python
|
|
19
|
+
import better_aws_tags as bats
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Reference
|
|
23
|
+
|
|
24
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/overview.html
|
|
25
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html
|
|
26
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html
|
|
27
|
+
- https://docs.aws.amazon.com/ARG/latest/userguide/supported-resources.html
|
|
28
|
+
|
|
29
|
+
AWS Resources and Resource Types:
|
|
30
|
+
- https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
|
|
31
|
+
- https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
# better-aws-tags
|
|
2
|
+
|
|
3
|
+
A unified Python interface for managing AWS resource tags.
|
|
4
|
+
|
|
5
|
+
AWS provides multiple tagging APIs across services, including the Resource Groups Tagging API and service-specific implementations such as EC2, S3, and IAM. This library abstracts these differences behind a single API that accepts any valid ARN and handles service routing, tag validation, and error reporting automatically.
|
|
6
|
+
|
|
7
|
+
## Getting Started
|
|
8
|
+
|
|
9
|
+
```python
|
|
10
|
+
import better_aws_tags as bats
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Reference
|
|
14
|
+
|
|
15
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/overview.html
|
|
16
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/API_TagResources.html
|
|
17
|
+
- https://docs.aws.amazon.com/resourcegroupstagging/latest/APIReference/supported-services.html
|
|
18
|
+
- https://docs.aws.amazon.com/ARG/latest/userguide/supported-resources.html
|
|
19
|
+
|
|
20
|
+
AWS Resources and Resource Types:
|
|
21
|
+
- https://docs.aws.amazon.com/IAM/latest/UserGuide/reference-arns.html
|
|
22
|
+
- https://docs.aws.amazon.com/service-authorization/latest/reference/reference_policies_actions-resources-contextkeys.html
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
*.json
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
.PHONY: build clean
|
|
2
|
+
|
|
3
|
+
PACKAGE_DIR = ../../src/better_aws_tags/arnmatch
|
|
4
|
+
|
|
5
|
+
build:
|
|
6
|
+
uv run stage_01_aws_services.py
|
|
7
|
+
uv run stage_02_aws_resources.py
|
|
8
|
+
uv run stage_03_aws_tag_actions.py
|
|
9
|
+
uv run stage_04_arn_index.py
|
|
10
|
+
uv run stage_05_arn_matcher.py
|
|
11
|
+
uv run stage_06_arn_regex.py
|
|
12
|
+
cp arn_patterns.py $(PACKAGE_DIR)/patterns.py
|
|
13
|
+
@echo "Installed patterns to $(PACKAGE_DIR)/patterns.py"
|
|
14
|
+
|
|
15
|
+
clean:
|
|
16
|
+
rm -f *.parquet arn_patterns.py
|