Settings management using Pydantic, with ability to retrieve cloud secrets.
Project description
Settus
Settings management using Pydantic Settings with cloud extensions.
Settus makes it possible to securely access local and cloud-stored secrets from multiple environments, with pre-defined fallback plans. Supported secrets provider are
- Azure Keyvault
- Databricks secrets [IN PROGRESS]
- AWS Secrets Manager
- GCP Secrets Manager [IN PROGRESS]
Help
See documentation for more details.
Installation
Install using
pip install laktory[{cloud_provider}]
where {cloud_provider}
is azure
, aws
, databricks
or gcp
.
For more installation options, see the Install section in the documentation.
A Basic Example
import os
from settus import BaseSettings
from settus import Field
KEYVAULT_URL = "https://o3-kv-settus-dev.vault.azure.net/"
AWS_SECRET_NAME = "vault"
os.environ["MY_ENV"] = "my_value"
class Settings(BaseSettings):
# Value from environment variable "MY_ENV"
my_env: str = Field(default="undefined")
# Value from the Azure keyvault named `o3-kv-settus-dev` with secret key `my-secret`
my_azure_secret: str = Field(default="undefined", alias="my-secret", keyvault_url=KEYVAULT_URL)
# Value from the secret named `vault` in AWS secrets manager and having the secret key `my-secret`
my_aws_secret: str = Field(default="undefined", alias="my-secret", aws_secret_name=AWS_SECRET_NAME)
settings = Settings()
print(settings.my_env)
#> my_value
print(settings.my_azure_secret)
#> secret_sauce
print(settings.my_aws_secret)
#> secret_sauce
To get started with more examples, jump into the Quickstart.
Okube Company
Okube is dedicated to build open source frameworks, the kubes, that empower businesses to build and deploy highly scalable data platforms and AI models. Contributions are more than welcome.
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 settus-0.0.11.tar.gz
.
File metadata
- Download URL: settus-0.0.11.tar.gz
- Upload date:
- Size: 273.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e68f11cc7ceeabff1d30f33f8a4a63fb395cf2b243c6184697d3c5695957ecdc |
|
MD5 | af7533f72f882a39bf8506797b842f09 |
|
BLAKE2b-256 | 3c575cccb7c173bebb1ab0bea2d1ff5fac2e1f78fe742785c72808869f24adae |
File details
Details for the file settus-0.0.11-py3-none-any.whl
.
File metadata
- Download URL: settus-0.0.11-py3-none-any.whl
- Upload date:
- Size: 10.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6114f93a67a46bb181541ad9c3487679e3ddff3b0f734792bfc4e1f346bfe57e |
|
MD5 | dea66e8d9bd1ccdfd6512930abb8e2fb |
|
BLAKE2b-256 | 79d4ff88c5c41e140658c4b5c5a5fc587e390d4ba6b7e1309565fed9180ffc63 |