Minimal Flask app with secrets injected by envlock.
- Python 3.9+
pip install -r requirements.txt
npx envlock-core dev # uses .env.development (default)
npx envlock-core dev --staging # uses .env.staging
npx envlock-core dev --production # uses .env.production| Flag | Description |
|---|---|
| (none) | Uses .env.development (default) |
--staging |
Uses .env.staging and injects staging secrets from 1Password |
--production |
Uses .env.production and injects production secrets from 1Password |
The server starts at http://localhost:3000 with secrets decrypted from .env.development via 1Password.
- Install dependencies:
pip install -r requirements.txt - Encrypt your
.env.development:npx @dotenvx/dotenvx encrypt -f .env.development - Store the generated
DOTENV_PRIVATE_KEY_DEVELOPMENTin a 1Password Environment - Set
onePasswordEnvIdinenvlock.config.js:
export default {
onePasswordEnvId: "your-1password-environment-id",
commands: {
dev: "python app.py",
},
};