Browse and manage AWS identity and organization resources.
Project description
aws_org_client
Contents
Overview
This project is a python package, aimed at providing a simple interface with AWS organisation & identity services.
Using boto3 clients:
- identitystore
- organizations
- sso-admin
Example Usage
Setup boto session & initialise organisations client to list accounts.
import boto3
from aws_org_client.organizations import Organizations
session = boto3.Session(profile_name='my_profile', region_name='my_region')
client = Organizations()
client.list_accounts()
Example response:
[
{
"Id": "string",
"Arn": "string",
"Email": "string",
"Name": "string",
"Status": "ACTIVE",
"JoinedMethod": "CREATED",
"JoinedTimestamp": datetime.datetime(1970, 1, 1, 00, 00, 00, 000000, tzinfo=tzlocal())
}
]
Development
Requirements
- Install python poetry.
- You will need a working aws profile configured in your filesystem.
Setup
Initialise a poetry environment:
poetry shell
Install dependencies:
poetry install
Project processes
Coverage report
run coverage report:
poetry run coverage run -m --source=aws_org_client pytest tests
poetry run coverage report
Linting
run pylint with:
poetry run pylint aws_org_client
poetry run pylint tests
Formatting
run black formatter with:
poetry run black .
SAST
run bandit scanner:
poetry run bandit .
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
aws_org_client-0.0.6.tar.gz
(3.7 kB
view hashes)
Built Distribution
Close
Hashes for aws_org_client-0.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7eb9b9e701d7513a7ee4e470cbf9e933d4c742bfde5907f2bc5c641f0756505 |
|
MD5 | f45d809702c45889300e03600d572de5 |
|
BLAKE2b-256 | 715b63f43f1517ebfe36ef8a15021cf2da05acc758d93983ff3da118f7524cd6 |