sai-akruti
Centralized, flexible settings loader for Python apps using Pydantic v2.x.
This library provides a reusable, extensible settings system with built-in support for:
- Multiple
.envfiles - AWS Systems Manager (SSM) Parameter Store
- AWS Secrets Manager
- Standard environment variables and secret files (handled via Pydantic automatically)
It’s designed for clean separation of settings logic and allows each app to define its own settings hierarchy, source priorities, and overrides.
✅ Features
- Compatible with Pydantic v2.x (
pydantic-settings). - Automatically loads settings on instantiation — no manual
.load()needed. - Supports per-environment configuration (
dev,prod, etc.). - Easy to extend for other sources (YAML, remote config, etc.).
- Production-safe and future-proof.
✅ Installation
pip install sai-akruti
✅ AWS Credentials & IAM Permissions (Required)
This library can also use AWS Systems Manager (SSM) Parameter Store and AWS Secrets Manager for secure configuration. Required IAM Permissions:
Ensure your environment (developer machine, Lambda, EC2, ECS, etc.) has the following IAM permissions:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:GetParametersByPath",
"secretsmanager:GetSecretValue"
],
"Resource": "*"
}
]
}
Best Practice: In production, restrict the "Resource" field to specific parameter/secret ARNs.
✅ How Credentials Are Provided:
This library uses boto3's standard credential chain:
- Environment Variables(AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, etc.)
- ~/.aws/credentials or configured profiles (via aws configure).
- IAM Role on EC2, Lambda, or ECS (via Instance Metadata Service).
- AWS CLI SSO or other advanced credential providers.
Usage in Lambda Functions:
When used in an AWS Lambda function:
- Assign an IAM Role to your Lambda function with the above permissions.
- No manual credential configuration is needed—boto3 automatically uses the Lambda’s IAM Role.
- Example IAM Policy for Lambda:
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"ssm:GetParametersByPath",
"secretsmanager:GetSecretValue"
],
"Resource": "arn:aws:ssm:REGION:ACCOUNT_ID:parameter/your-prefix/*"
}
]
}
How to retrieve AWS Account ID:
To retrieve the AWS Account ID in your code:
import boto3
account_id = boto3.client("sts").get_caller_identity()["Account"]
How to release to PyPI manually: To release a new version to PyPI, follow these steps:
- Update the version in
pyproject.toml. - Build the package:
python -m build
- Upload to PyPI:
python publish
Special Note:
- For SSM, if the parameter is defined as a String or SecretString and is a dict which has "keyName" as one of its keys, then it will be used as the key for the settings. Otherwise, the dictionary will be unpacked and each key will be used as a setting.
Metadata
Release files for sai-akruti 0.5.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sai_akruti-0.5.7.tar.gz | 10.1 kB | With provenance | Details for sai_akruti-0.5.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sai_akruti-0.5.7-py3-none-any.whl | Python 3 | none | any | Details for sai_akruti-0.5.7-py3-none-any.whl |
Total release size: 21.9 kB
Release files / sai_akruti-0.5.7.tar.gz
| Download URL | sai_akruti-0.5.7.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
73f1a24a2cbe72aaf773d39e4b3e86d39c5ca73c79bd247138cb913ef6b43537
|
|
BLAKE2b-256 checksum How to use checksums |
8d36442ff175590a923fcc6afc7c76556813f2f0d4593a7a7bcb9b5499dde93e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logRelease files / sai_akruti-0.5.7-py3-none-any.whl
| Download URL | sai_akruti-0.5.7-py3-none-any.whl |
|---|---|
| Size | 11.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9f3fd1f572e1f47bd19f9229f54e7828eccef475b63cf4582d18e6d6191e89b9
|
|
BLAKE2b-256 checksum How to use checksums |
08acfda540e83226e0005cd57f975b8129bdbf7622fe6d12d1aee6015509352a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logSecurity for sai-akruti 0.5.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for sai_akruti-0.5.7.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 20, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.