Config and Secrets Management

Separates configuration from credentials for Django and Python services, loading secrets from local .env files or AWS Secrets Manager once at startup.

Built for
DjangoPythonAWS Secrets Manager
1–2 days
to adapt to a new service
0
secrets in git or in os.environ
1 call
per secret, at process startup
4
environments from one YAML file

Ideas2IT has built for

Credentials out of sight, settings in git

Three common ways to handle config and secrets in Python services, side by side.

Environment variables only
The common default
Built per service
Each team's own approach
With Ideas2IT's accelerator
One standard pattern
Where secrets live
In os.environ, readable with printenv on the pod
Varies by service
Local .env or AWS Secrets Manager, never in os.environ
Where settings live
Mixed in with credentials
Varies by service
One YAML file, tracked in git and easy to diff
Switching environments
Edit variables by hand
Different in every service
One setting picks development, QA, staging or production
Reading values at runtime
Lookups spread through the code
Varies by service
Loaded once at startup, then read from memory
Checking before a deploy
Problems show up at runtime
Ad hoc scripts
A verify command checks config, secrets and integrations

What the accelerator does

Our engineers move each service's settings into a git-tracked YAML file, keep credentials in a separate source, and wire both into the service's settings.

01

Split settings from secrets

Settings live in a YAML file tracked in git. Credentials live in .env or AWS Secrets Manager.

02

Pick the environment

One setting selects development, QA, staging or production.

03

Load once at startup

Secrets are fetched once when the service starts, then read from memory.

04

Verify before deploy

One command checks config, secrets and integrations before go-live.

envs/.env.development (git-ignored)
Example configuration
1
# selects the YAML section and env file
2
ENVIRONMENT=development
3
SECRETS_SOURCE=local
4
5
# credentials only, never committed
6
DB_PASSWORD=••••••••
7
STRIPE_KEY=••••••••
8
9
# settings stay in config/config.yaml
Credentials never reach git or os.environ

Which value wins?

Every setting is looked up in a fixed order. Turn sources on and off to see which one the service uses for db_host.

1
OS env variable
db-override.internal
2
YAML production section
orders-db.internal
3
YAML default section
localhost
4
Default in the code
127.0.0.1
db_host resolves to
orders-db.internal
From the YAML production section
Book a demo

Orthodontic treatment planning software and clear aligners, run through uDesign Cloud.

The challenge
Settings and credentials handled differently across Django services, and slow load times in uDesign Cloud.
What we did
Rolled out one config and secrets pattern, with values cached at startup instead of read on every request.
uDesign Cloud treatment planning screen
0
secrets in source control or in environment variables
4
environments run from one config pattern
1 call
per secret to AWS, at process startup
1
command to verify a deployment

How Ideas2IT sets it up for you

You work with Ideas2IT engineers who built the accelerator and run it in production.

01

We review your services

We look at how each service loads settings and credentials today, and where secrets are exposed.

02

We set up the pattern

Config file, secrets loader, environment files and settings, wired into each service.

About 1–2 days per service
03

We verify every environment

We run the verify command in development, QA, staging and production before go-live.

Config and secrets questions

Does it work outside Django?

It was built for Django services and fits other Python microservices too. Most setups need only environment files and secret definitions.

Today it reads from local .env files or AWS Secrets Manager. The loaders are modular, so other providers can be added.

Anything in os.environ can be read with printenv or from /proc on a running pod. The loader keeps secrets inside the application instead.

About 1 to 2 days per service. Our engineers set up the config file, the secrets loader and the environment files, then verify each environment.

Clean up config across your services

Tell us how your services handle settings and secrets today. We plan the rollout, usually 1–2 days per service.