arnparse is a Python library designed to parse Amazon Resource Names (ARNs) into their constituent components like partition, service, region, account ID, and resource. As of version 0.0.2, it provides a straightforward API for extracting information from common ARN formats. The project is in an early stage with a relatively slow release cadence.
pip install arnparseVerified import paths — ran on the pinned version, not inferred.
This example demonstrates how to parse an AWS SNS Topic ARN string and access its individual components using the `arnparse` function.
Stay updated with releases and carefully review release notes for any API changes.
Thoroughly test with the specific ARN formats your application uses. Consider contributing to the project for unsupported ARN types.
Assess the project's activity and be prepared to fork or contribute if specific needs arise that aren't addressed by the maintainers.
Install the module using pip: 'pip install arnparse'.
Use the correct import statement: 'from arnparse import arnparse'.
Import the function correctly: 'from arnparse import arnparse', then call it as 'arnparse(arn_string)'.
Ensure the ARN string follows the standard format: `arn:partition:service:region:account-id:resource` and that all components are valid for the expected service.
Check the available attributes of the `ARN` object (e.g., `partition`, `service`, `region`, `account_id`, `resource_type`, `resource`) and verify the spelling. You can print the `ARN` object or its `__dict__` to inspect its properties.
No dependency data recorded yet.