Parse an arn in multiple components.
Project description
coveo-arnparse
Simple dataclass and parser around Amazon Resource Names (ARNs).
Ref: https://docs.aws.amazon.com/general/latest/gr/aws-arns-and-namespaces.html
Usage
Parse from a string
>>> from coveo_arnparse import arnparse
>>> arn = arnparse("arn:aws:sns:us-east-1:123456789012:my_topic")
>>> repr(arn)
Arn(partition='aws', service='sns', region='us-east-1', account='123456789012', resource='my_topic')
>>> str(arn)
"arn:aws:sns:us-east-1:123456789012:my_topic"
>>> arn.resource_type
''
>>> arn.resource_id
''
When a : or a / is in the resource, you can also obtain either parts:
>>> from coveo_arnparse import arnparse
>>> arn = arnparse("arn:aws:ssm:us-east-1:123456789012:parameter/path/key")
>>> arn.resource_type
'parameter'
>>> arn.resource_id
'path/key'
>>> arn.resource
'parameter/path/key'
Create an instance directly
>>> from coveo_arnparse import Arn
>>> Arn(service="s3", resource="my_bucket/path/file.jpg")
Arn(partition='aws', service='s3', region='', account='', resource='my_bucket/path/file.jpg')
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coveo_arnparse-2.0.1.tar.gz.
File metadata
- Download URL: coveo_arnparse-2.0.1.tar.gz
- Upload date:
- Size: 2.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
030de577aa95427639c6136804e18c060fd135ab5036f654fe2af25b6ce350b6
|
|
| MD5 |
0d9415a00eea29c1406688a1954669ea
|
|
| BLAKE2b-256 |
d55b2198ab71151506bbd79865f2be2a9e0704b2179c8d4e01592f1b1edd288f
|
Provenance
The following attestation bundles were made for coveo_arnparse-2.0.1.tar.gz:
Publisher:
coveo-arnparse.yml on coveooss/coveo-python-oss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coveo_arnparse-2.0.1.tar.gz -
Subject digest:
030de577aa95427639c6136804e18c060fd135ab5036f654fe2af25b6ce350b6 - Sigstore transparency entry: 720982983
- Sigstore integration time:
-
Permalink:
coveooss/coveo-python-oss@a56629533d875426dc5170dbec5a6ee32ca5b7d6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coveooss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
coveo-arnparse.yml@a56629533d875426dc5170dbec5a6ee32ca5b7d6 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file coveo_arnparse-2.0.1-py3-none-any.whl.
File metadata
- Download URL: coveo_arnparse-2.0.1-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9bce51ffa814cde1ab63e808bb3bb3046f74cdef73432c77405bb4fb58de68f0
|
|
| MD5 |
7579f4879f99e20cba8c51f32be3d796
|
|
| BLAKE2b-256 |
87dc9195c5af5d2ad3c8cd63f94e7b927617f6c8e67da8d27d941b6c47797078
|
Provenance
The following attestation bundles were made for coveo_arnparse-2.0.1-py3-none-any.whl:
Publisher:
coveo-arnparse.yml on coveooss/coveo-python-oss
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coveo_arnparse-2.0.1-py3-none-any.whl -
Subject digest:
9bce51ffa814cde1ab63e808bb3bb3046f74cdef73432c77405bb4fb58de68f0 - Sigstore transparency entry: 720983037
- Sigstore integration time:
-
Permalink:
coveooss/coveo-python-oss@a56629533d875426dc5170dbec5a6ee32ca5b7d6 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/coveooss
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
coveo-arnparse.yml@a56629533d875426dc5170dbec5a6ee32ca5b7d6 -
Trigger Event:
workflow_dispatch
-
Statement type: