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 .
Documentation
this project uses sphinx to produce a static html site; published to github pages.
github actions takes care of building the site & publishing it.
to update the files used to build documentation use:
poetry run sphinx-apidoc --ext-autodoc -f -o docs .
include any changes to the docs directory
Build Documentation locally
you may wish to build documentation locally before publishing it.
form the project root run:
poetry run sphinx-build docs _build
this will create directory _build
in the project root where you can load
html in your browser.
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
File details
Details for the file aws_org_client-0.0.15.tar.gz
.
File metadata
- Download URL: aws_org_client-0.0.15.tar.gz
- Upload date:
- Size: 8.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.8 Linux/6.5.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5c2fcc711c8602446c064cbbf24c7ae3bca8b97dc4d7693a3f619b07f7d6c6a0 |
|
MD5 | 1def7cce51bf1b1576e1085760fc563e |
|
BLAKE2b-256 | d74e59b8bfff8f44d4e48542b1628e1f6a3aaef627388808af572b2d2067a231 |
File details
Details for the file aws_org_client-0.0.15-py3-none-any.whl
.
File metadata
- Download URL: aws_org_client-0.0.15-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.6.1 CPython/3.11.8 Linux/6.5.0-1015-azure
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f614a8cb97c8b1553541138a07a573bd77ebd742e124bef7e8271c416e213336 |
|
MD5 | a55feefc24a35df371d8e3f8b1a83e03 |
|
BLAKE2b-256 | 518b3ef49bc4e15687fc302e271ad287dc6befdd0b1f97894005cdc4f6db25b7 |