envdrift 3.1.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- envdrift-3.1.3/.github/workflows/ci.yml +42 -0
- envdrift-3.1.3/.github/workflows/docs.yml +52 -0
- envdrift-3.1.3/.github/workflows/publish.yml +63 -0
- envdrift-3.1.3/.gitignore +84 -0
- envdrift-3.1.3/.markdownlint.json +16 -0
- envdrift-3.1.3/.pre-commit-config.yaml +40 -0
- envdrift-3.1.3/LICENSE +21 -0
- envdrift-3.1.3/Makefile +95 -0
- envdrift-3.1.3/PKG-INFO +156 -0
- envdrift-3.1.3/README.md +92 -0
- envdrift-3.1.3/docs/assets/images/env-drift-logo.png +0 -0
- envdrift-3.1.3/docs/cli/decrypt.md +169 -0
- envdrift-3.1.3/docs/cli/diff.md +238 -0
- envdrift-3.1.3/docs/cli/encrypt.md +197 -0
- envdrift-3.1.3/docs/cli/hook.md +252 -0
- envdrift-3.1.3/docs/cli/index.md +76 -0
- envdrift-3.1.3/docs/cli/init.md +229 -0
- envdrift-3.1.3/docs/cli/sync.md +356 -0
- envdrift-3.1.3/docs/cli/validate.md +237 -0
- envdrift-3.1.3/docs/cli/version.md +61 -0
- envdrift-3.1.3/docs/getting-started/installation.md +54 -0
- envdrift-3.1.3/docs/getting-started/quickstart.md +99 -0
- envdrift-3.1.3/docs/glossary.md +244 -0
- envdrift-3.1.3/docs/guides/cicd.md +166 -0
- envdrift-3.1.3/docs/guides/contributing.md +50 -0
- envdrift-3.1.3/docs/guides/encryption.md +178 -0
- envdrift-3.1.3/docs/guides/releasing.md +148 -0
- envdrift-3.1.3/docs/guides/schema.md +168 -0
- envdrift-3.1.3/docs/guides/vault-sync.md +627 -0
- envdrift-3.1.3/docs/index.md +1 -0
- envdrift-3.1.3/docs/reference/api.md +209 -0
- envdrift-3.1.3/docs/stylesheets/extra.css +72 -0
- envdrift-3.1.3/mkdocs.yml +84 -0
- envdrift-3.1.3/pyproject.toml +173 -0
- envdrift-3.1.3/src/envdrift/__init__.py +30 -0
- envdrift-3.1.3/src/envdrift/_version.py +34 -0
- envdrift-3.1.3/src/envdrift/api.py +192 -0
- envdrift-3.1.3/src/envdrift/cli.py +1033 -0
- envdrift-3.1.3/src/envdrift/config.py +364 -0
- envdrift-3.1.3/src/envdrift/constants.json +10 -0
- envdrift-3.1.3/src/envdrift/core/__init__.py +30 -0
- envdrift-3.1.3/src/envdrift/core/diff.py +233 -0
- envdrift-3.1.3/src/envdrift/core/encryption.py +241 -0
- envdrift-3.1.3/src/envdrift/core/parser.py +239 -0
- envdrift-3.1.3/src/envdrift/core/schema.py +253 -0
- envdrift-3.1.3/src/envdrift/core/validator.py +310 -0
- envdrift-3.1.3/src/envdrift/integrations/__init__.py +18 -0
- envdrift-3.1.3/src/envdrift/integrations/dotenvx.py +683 -0
- envdrift-3.1.3/src/envdrift/integrations/precommit.py +266 -0
- envdrift-3.1.3/src/envdrift/output/__init__.py +21 -0
- envdrift-3.1.3/src/envdrift/output/rich.py +419 -0
- envdrift-3.1.3/src/envdrift/py.typed +0 -0
- envdrift-3.1.3/src/envdrift/sync/__init__.py +26 -0
- envdrift-3.1.3/src/envdrift/sync/config.py +184 -0
- envdrift-3.1.3/src/envdrift/sync/engine.py +337 -0
- envdrift-3.1.3/src/envdrift/sync/operations.py +138 -0
- envdrift-3.1.3/src/envdrift/sync/result.py +99 -0
- envdrift-3.1.3/src/envdrift/vault/__init__.py +92 -0
- envdrift-3.1.3/src/envdrift/vault/aws.py +253 -0
- envdrift-3.1.3/src/envdrift/vault/azure.py +170 -0
- envdrift-3.1.3/src/envdrift/vault/base.py +132 -0
- envdrift-3.1.3/src/envdrift/vault/hashicorp.py +238 -0
- envdrift-3.1.3/tests/__init__.py +1 -0
- envdrift-3.1.3/tests/conftest.py +205 -0
- envdrift-3.1.3/tests/test_cli.py +178 -0
- envdrift-3.1.3/tests/unit/__init__.py +1 -0
- envdrift-3.1.3/tests/unit/test_api.py +195 -0
- envdrift-3.1.3/tests/unit/test_cli.py +1263 -0
- envdrift-3.1.3/tests/unit/test_config.py +379 -0
- envdrift-3.1.3/tests/unit/test_diff.py +171 -0
- envdrift-3.1.3/tests/unit/test_dotenvx.py +936 -0
- envdrift-3.1.3/tests/unit/test_encryption.py +200 -0
- envdrift-3.1.3/tests/unit/test_parser.py +212 -0
- envdrift-3.1.3/tests/unit/test_precommit.py +269 -0
- envdrift-3.1.3/tests/unit/test_rich_output.py +246 -0
- envdrift-3.1.3/tests/unit/test_sync_config.py +364 -0
- envdrift-3.1.3/tests/unit/test_sync_engine.py +504 -0
- envdrift-3.1.3/tests/unit/test_sync_operations.py +239 -0
- envdrift-3.1.3/tests/unit/test_validator.py +282 -0
- envdrift-3.1.3/tests/unit/test_vault.py +248 -0
- envdrift-3.1.3/tests/unit/test_vault_aws.py +470 -0
- envdrift-3.1.3/tests/unit/test_vault_azure.py +178 -0
- envdrift-3.1.3/tests/unit/test_vault_hashicorp.py +299 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
tests:
|
|
15
|
+
name: Tests & Coverage
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- name: Checkout
|
|
19
|
+
uses: actions/checkout@v6
|
|
20
|
+
|
|
21
|
+
- name: Set up Python
|
|
22
|
+
uses: actions/setup-python@v6
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.11"
|
|
25
|
+
|
|
26
|
+
- name: Install uv
|
|
27
|
+
uses: astral-sh/setup-uv@v6
|
|
28
|
+
|
|
29
|
+
- name: Install dependencies
|
|
30
|
+
run: uv sync --all-extras
|
|
31
|
+
|
|
32
|
+
- name: Run tests with coverage
|
|
33
|
+
run: uv run pytest
|
|
34
|
+
|
|
35
|
+
- name: Lint markdown docs
|
|
36
|
+
run: make lint-docs
|
|
37
|
+
|
|
38
|
+
- name: Upload coverage reports to Codecov
|
|
39
|
+
uses: codecov/codecov-action@v5
|
|
40
|
+
with:
|
|
41
|
+
token: ${{ secrets.CODECOV_TOKEN }}
|
|
42
|
+
files: coverage.xml
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Deploy Docs
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- 'docs/**'
|
|
8
|
+
- 'mkdocs.yml'
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pages: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: pages
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v6
|
|
25
|
+
|
|
26
|
+
- name: Set up Python
|
|
27
|
+
uses: actions/setup-python@v6
|
|
28
|
+
with:
|
|
29
|
+
python-version: '3.11'
|
|
30
|
+
|
|
31
|
+
- name: Install dependencies
|
|
32
|
+
run: |
|
|
33
|
+
pip install mkdocs-material
|
|
34
|
+
|
|
35
|
+
- name: Build docs
|
|
36
|
+
run: mkdocs build --strict
|
|
37
|
+
|
|
38
|
+
- name: Upload artifact
|
|
39
|
+
uses: actions/upload-pages-artifact@v4
|
|
40
|
+
with:
|
|
41
|
+
path: site
|
|
42
|
+
|
|
43
|
+
deploy:
|
|
44
|
+
needs: build
|
|
45
|
+
runs-on: ubuntu-latest
|
|
46
|
+
environment:
|
|
47
|
+
name: github-pages
|
|
48
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
49
|
+
steps:
|
|
50
|
+
- name: Deploy to GitHub Pages
|
|
51
|
+
id: deployment
|
|
52
|
+
uses: actions/deploy-pages@v4
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
id-token: write
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
test:
|
|
14
|
+
name: Test matrix (3.11–3.13)
|
|
15
|
+
runs-on: ubuntu-latest
|
|
16
|
+
strategy:
|
|
17
|
+
fail-fast: false
|
|
18
|
+
matrix:
|
|
19
|
+
python-version: ["3.11", "3.12", "3.13"]
|
|
20
|
+
steps:
|
|
21
|
+
- name: Checkout
|
|
22
|
+
uses: actions/checkout@v6
|
|
23
|
+
|
|
24
|
+
- name: Set up Python
|
|
25
|
+
uses: actions/setup-python@v6
|
|
26
|
+
with:
|
|
27
|
+
python-version: ${{ matrix.python-version }}
|
|
28
|
+
|
|
29
|
+
- name: Install uv
|
|
30
|
+
uses: astral-sh/setup-uv@v6
|
|
31
|
+
|
|
32
|
+
- name: Install dependencies
|
|
33
|
+
run: uv sync --all-extras
|
|
34
|
+
|
|
35
|
+
- name: Run tests
|
|
36
|
+
run: uv run pytest
|
|
37
|
+
|
|
38
|
+
publish:
|
|
39
|
+
name: Publish to PyPI
|
|
40
|
+
runs-on: ubuntu-latest
|
|
41
|
+
needs: test
|
|
42
|
+
steps:
|
|
43
|
+
- name: Checkout
|
|
44
|
+
uses: actions/checkout@v6
|
|
45
|
+
with:
|
|
46
|
+
fetch-depth: 0 # Fetch all history for hatch-vcs to determine version
|
|
47
|
+
|
|
48
|
+
- name: Set up Python
|
|
49
|
+
uses: actions/setup-python@v6
|
|
50
|
+
with:
|
|
51
|
+
python-version: "3.11"
|
|
52
|
+
|
|
53
|
+
- name: Install uv
|
|
54
|
+
uses: astral-sh/setup-uv@v6
|
|
55
|
+
|
|
56
|
+
- name: Install dependencies
|
|
57
|
+
run: uv sync --all-extras
|
|
58
|
+
|
|
59
|
+
- name: Build package
|
|
60
|
+
run: uv build
|
|
61
|
+
|
|
62
|
+
- name: Publish to PyPI
|
|
63
|
+
run: uv publish
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Byte-compiled / optimized / DLL files
|
|
2
|
+
__pycache__/
|
|
3
|
+
*.py[cod]
|
|
4
|
+
*$py.class
|
|
5
|
+
|
|
6
|
+
# C extensions
|
|
7
|
+
*.so
|
|
8
|
+
|
|
9
|
+
# Distribution / packaging
|
|
10
|
+
.Python
|
|
11
|
+
build/
|
|
12
|
+
develop-eggs/
|
|
13
|
+
dist/
|
|
14
|
+
downloads/
|
|
15
|
+
eggs/
|
|
16
|
+
.eggs/
|
|
17
|
+
lib/
|
|
18
|
+
lib64/
|
|
19
|
+
parts/
|
|
20
|
+
sdist/
|
|
21
|
+
var/
|
|
22
|
+
wheels/
|
|
23
|
+
*.egg-info/
|
|
24
|
+
.installed.cfg
|
|
25
|
+
*.egg
|
|
26
|
+
|
|
27
|
+
# hatch-vcs generated version file
|
|
28
|
+
src/envdrift/_version.py
|
|
29
|
+
|
|
30
|
+
# PyInstaller
|
|
31
|
+
*.manifest
|
|
32
|
+
*.spec
|
|
33
|
+
|
|
34
|
+
# Installer logs
|
|
35
|
+
pip-log.txt
|
|
36
|
+
pip-delete-this-directory.txt
|
|
37
|
+
|
|
38
|
+
# Unit test / coverage reports
|
|
39
|
+
htmlcov/
|
|
40
|
+
.tox/
|
|
41
|
+
.nox/
|
|
42
|
+
.coverage
|
|
43
|
+
.coverage.*
|
|
44
|
+
.cache
|
|
45
|
+
nosetests.xml
|
|
46
|
+
coverage.xml
|
|
47
|
+
*.cover
|
|
48
|
+
*.py,cover
|
|
49
|
+
.hypothesis/
|
|
50
|
+
.pytest_cache/
|
|
51
|
+
|
|
52
|
+
# Translations
|
|
53
|
+
*.mo
|
|
54
|
+
*.pot
|
|
55
|
+
|
|
56
|
+
# Environments
|
|
57
|
+
.env
|
|
58
|
+
.env.*
|
|
59
|
+
!.env.example
|
|
60
|
+
.venv
|
|
61
|
+
env/
|
|
62
|
+
venv/
|
|
63
|
+
ENV/
|
|
64
|
+
env.bak/
|
|
65
|
+
venv.bak/
|
|
66
|
+
|
|
67
|
+
# IDE
|
|
68
|
+
.idea/
|
|
69
|
+
.vscode/
|
|
70
|
+
*.swp
|
|
71
|
+
*.swo
|
|
72
|
+
*~
|
|
73
|
+
|
|
74
|
+
# Ruff
|
|
75
|
+
.ruff_cache/
|
|
76
|
+
|
|
77
|
+
# macOS
|
|
78
|
+
.DS_Store
|
|
79
|
+
|
|
80
|
+
# UV
|
|
81
|
+
.uv/
|
|
82
|
+
.uv-cache/
|
|
83
|
+
uv.lock
|
|
84
|
+
site/
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
repos:
|
|
2
|
+
- repo: https://github.com/astral-sh/ruff-pre-commit
|
|
3
|
+
rev: v0.8.2
|
|
4
|
+
hooks:
|
|
5
|
+
- id: ruff
|
|
6
|
+
args: [--fix]
|
|
7
|
+
- id: ruff-format
|
|
8
|
+
|
|
9
|
+
- repo: https://github.com/PyCQA/bandit
|
|
10
|
+
rev: 1.7.10
|
|
11
|
+
hooks:
|
|
12
|
+
- id: bandit
|
|
13
|
+
args: ["-c", "pyproject.toml", "-r", "src"]
|
|
14
|
+
additional_dependencies: ["bandit[toml]"]
|
|
15
|
+
|
|
16
|
+
- repo: https://github.com/pre-commit/pre-commit-hooks
|
|
17
|
+
rev: v5.0.0
|
|
18
|
+
hooks:
|
|
19
|
+
- id: trailing-whitespace
|
|
20
|
+
- id: end-of-file-fixer
|
|
21
|
+
- id: check-yaml
|
|
22
|
+
- id: check-added-large-files
|
|
23
|
+
- id: check-toml
|
|
24
|
+
|
|
25
|
+
- repo: https://github.com/DavidAnson/markdownlint-cli2
|
|
26
|
+
rev: v0.17.2
|
|
27
|
+
hooks:
|
|
28
|
+
- id: markdownlint-cli2
|
|
29
|
+
args: ["**/*.md", "#node_modules", "#.venv", "#venv", "#.git", "#dist", "#build", "#site"]
|
|
30
|
+
|
|
31
|
+
- repo: local
|
|
32
|
+
hooks:
|
|
33
|
+
- id: pytest
|
|
34
|
+
name: pytest
|
|
35
|
+
entry: uv run pytest -q
|
|
36
|
+
language: system
|
|
37
|
+
pass_filenames: false
|
|
38
|
+
always_run: true
|
|
39
|
+
stages: [pre-push]
|
|
40
|
+
timeout: 300 # 5 minutes; adjust based on typical test duration
|
envdrift-3.1.3/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jainal Gosaliya
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
envdrift-3.1.3/Makefile
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
.PHONY: install dev lint format typecheck security test build clean publish docs docs-serve lint-docs help
|
|
2
|
+
|
|
3
|
+
# Default target
|
|
4
|
+
help:
|
|
5
|
+
@echo "envdrift - Prevent environment variable drift"
|
|
6
|
+
@echo ""
|
|
7
|
+
@echo "Usage: make [target]"
|
|
8
|
+
@echo ""
|
|
9
|
+
@echo "Targets:"
|
|
10
|
+
@echo " install Install production dependencies"
|
|
11
|
+
@echo " dev Install development dependencies"
|
|
12
|
+
@echo " lint Run linting with ruff"
|
|
13
|
+
@echo " format Format code with ruff"
|
|
14
|
+
@echo " typecheck Run type checking with pyrefly"
|
|
15
|
+
@echo " security Run security checks with bandit"
|
|
16
|
+
@echo " test Run tests with pytest"
|
|
17
|
+
@echo " check Run all checks (lint, typecheck, security, test)"
|
|
18
|
+
@echo " docs Build documentation"
|
|
19
|
+
@echo " docs-serve Serve documentation locally"
|
|
20
|
+
@echo " lint-docs Run markdown linting on docs"
|
|
21
|
+
@echo " build Build package for distribution"
|
|
22
|
+
@echo " publish Publish to PyPI"
|
|
23
|
+
@echo " clean Remove build artifacts"
|
|
24
|
+
|
|
25
|
+
# Install production dependencies
|
|
26
|
+
install:
|
|
27
|
+
uv sync
|
|
28
|
+
|
|
29
|
+
# Install development dependencies
|
|
30
|
+
dev:
|
|
31
|
+
uv sync --all-extras
|
|
32
|
+
|
|
33
|
+
# Run linting
|
|
34
|
+
lint:
|
|
35
|
+
uv run ruff check src tests
|
|
36
|
+
|
|
37
|
+
# Format code
|
|
38
|
+
format:
|
|
39
|
+
uv run ruff check --fix src tests
|
|
40
|
+
uv run ruff format src tests
|
|
41
|
+
|
|
42
|
+
# Run type checking with pyrefly
|
|
43
|
+
typecheck:
|
|
44
|
+
uv run pyrefly check src
|
|
45
|
+
|
|
46
|
+
# Run security checks with bandit
|
|
47
|
+
security:
|
|
48
|
+
uv run bandit -r src -c pyproject.toml
|
|
49
|
+
|
|
50
|
+
# Run tests
|
|
51
|
+
test:
|
|
52
|
+
uv run pytest
|
|
53
|
+
|
|
54
|
+
# Run all checks
|
|
55
|
+
check: lint typecheck security test
|
|
56
|
+
|
|
57
|
+
# Build package
|
|
58
|
+
build: clean
|
|
59
|
+
uv build
|
|
60
|
+
|
|
61
|
+
# Publish to PyPI
|
|
62
|
+
publish: build
|
|
63
|
+
uv publish
|
|
64
|
+
|
|
65
|
+
# Publish to TestPyPI first (for testing)
|
|
66
|
+
publish-test: build
|
|
67
|
+
uv publish --index-url https://test.pypi.org/simple/
|
|
68
|
+
|
|
69
|
+
# Build documentation
|
|
70
|
+
docs:
|
|
71
|
+
uv run mkdocs build --strict
|
|
72
|
+
|
|
73
|
+
# Serve documentation locally
|
|
74
|
+
docs-serve:
|
|
75
|
+
uv run mkdocs serve
|
|
76
|
+
|
|
77
|
+
# Lint markdown documentation
|
|
78
|
+
lint-docs:
|
|
79
|
+
@echo "Linting markdown files..."
|
|
80
|
+
npx markdownlint-cli2 "**/*.md" "#node_modules" "#.venv" "#venv" "#.git" "#dist" "#build" "#site" "#.pytest_cache" \
|
|
81
|
+
"#.ruff_cache" "#.uv-cache"
|
|
82
|
+
|
|
83
|
+
# Clean build artifacts
|
|
84
|
+
clean:
|
|
85
|
+
rm -rf dist/
|
|
86
|
+
rm -rf build/
|
|
87
|
+
rm -rf site/
|
|
88
|
+
rm -rf *.egg-info/
|
|
89
|
+
rm -rf src/*.egg-info/
|
|
90
|
+
rm -rf .pytest_cache/
|
|
91
|
+
rm -rf .ruff_cache/
|
|
92
|
+
rm -rf .coverage
|
|
93
|
+
rm -rf htmlcov/
|
|
94
|
+
find . -type d -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
|
|
95
|
+
find . -type f -name "*.pyc" -delete 2>/dev/null || true
|
envdrift-3.1.3/PKG-INFO
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: envdrift
|
|
3
|
+
Version: 3.1.3
|
|
4
|
+
Summary: Prevent environment variable drift with Pydantic schema validation, pre-commit hooks, and dotenvx encryption
|
|
5
|
+
Project-URL: Homepage, https://github.com/jainal09/envdrift
|
|
6
|
+
Project-URL: Documentation, https://jainal09.github.io/envdrift
|
|
7
|
+
Project-URL: Repository, https://github.com/jainal09/envdrift
|
|
8
|
+
Project-URL: Issues, https://github.com/jainal09/envdrift/issues
|
|
9
|
+
Author-email: Jainal Gosaliya <gosaliya.jainal@gmail.com>
|
|
10
|
+
License-Expression: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: aws,azure,config,dotenv,dotenvx,drift,encryption,environment,hashicorp,pre-commit,pydantic,schema,secrets,validation,variables,vault
|
|
13
|
+
Classifier: Development Status :: 3 - Alpha
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Operating System :: OS Independent
|
|
17
|
+
Classifier: Programming Language :: Python :: 3
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
21
|
+
Classifier: Topic :: Security
|
|
22
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
23
|
+
Classifier: Topic :: Software Development :: Quality Assurance
|
|
24
|
+
Classifier: Typing :: Typed
|
|
25
|
+
Requires-Python: >=3.11
|
|
26
|
+
Requires-Dist: pydantic-settings>=2.0
|
|
27
|
+
Requires-Dist: pydantic>=2.0
|
|
28
|
+
Requires-Dist: python-dotenv>=1.0
|
|
29
|
+
Requires-Dist: rich>=13.0
|
|
30
|
+
Requires-Dist: typer>=0.9
|
|
31
|
+
Provides-Extra: all
|
|
32
|
+
Requires-Dist: azure-identity>=1.15; extra == 'all'
|
|
33
|
+
Requires-Dist: azure-keyvault-secrets>=4.8; extra == 'all'
|
|
34
|
+
Requires-Dist: boto3>=1.34; extra == 'all'
|
|
35
|
+
Requires-Dist: hvac>=2.0; extra == 'all'
|
|
36
|
+
Requires-Dist: pyyaml>=6.0; extra == 'all'
|
|
37
|
+
Provides-Extra: aws
|
|
38
|
+
Requires-Dist: boto3>=1.34; extra == 'aws'
|
|
39
|
+
Provides-Extra: azure
|
|
40
|
+
Requires-Dist: azure-identity>=1.15; extra == 'azure'
|
|
41
|
+
Requires-Dist: azure-keyvault-secrets>=4.8; extra == 'azure'
|
|
42
|
+
Provides-Extra: dev
|
|
43
|
+
Requires-Dist: bandit>=1.7.0; extra == 'dev'
|
|
44
|
+
Requires-Dist: mkdocs-material>=9.5; extra == 'dev'
|
|
45
|
+
Requires-Dist: pre-commit>=3.0; extra == 'dev'
|
|
46
|
+
Requires-Dist: pyrefly>=0.2.0; extra == 'dev'
|
|
47
|
+
Requires-Dist: pytest-cov>=4.0; extra == 'dev'
|
|
48
|
+
Requires-Dist: pytest-mock>=3.12; extra == 'dev'
|
|
49
|
+
Requires-Dist: pytest>=8.0; extra == 'dev'
|
|
50
|
+
Requires-Dist: pyyaml>=6.0; extra == 'dev'
|
|
51
|
+
Requires-Dist: ruff>=0.8.0; extra == 'dev'
|
|
52
|
+
Provides-Extra: docs
|
|
53
|
+
Requires-Dist: mkdocs-material>=9.5; extra == 'docs'
|
|
54
|
+
Provides-Extra: hashicorp
|
|
55
|
+
Requires-Dist: hvac>=2.0; extra == 'hashicorp'
|
|
56
|
+
Provides-Extra: precommit
|
|
57
|
+
Requires-Dist: pyyaml>=6.0; extra == 'precommit'
|
|
58
|
+
Provides-Extra: vault
|
|
59
|
+
Requires-Dist: azure-identity>=1.15; extra == 'vault'
|
|
60
|
+
Requires-Dist: azure-keyvault-secrets>=4.8; extra == 'vault'
|
|
61
|
+
Requires-Dist: boto3>=1.34; extra == 'vault'
|
|
62
|
+
Requires-Dist: hvac>=2.0; extra == 'vault'
|
|
63
|
+
Description-Content-Type: text/markdown
|
|
64
|
+
|
|
65
|
+
<p align="center">
|
|
66
|
+
<img src="https://raw.githubusercontent.com/jainal09/envdrift/main/docs/assets/images/env-drift-logo.png" alt="envdrift logo" width="300">
|
|
67
|
+
</p>
|
|
68
|
+
|
|
69
|
+
# envdrift
|
|
70
|
+
|
|
71
|
+
[](https://badge.fury.io/py/envdrift)
|
|
72
|
+
[](https://www.python.org/downloads/)
|
|
73
|
+
[](https://opensource.org/licenses/MIT)
|
|
74
|
+
[](https://jainal09.github.io/envdrift)
|
|
75
|
+
[](https://github.com/astral-sh/ruff)
|
|
76
|
+
[](https://github.com/facebook/pyrefly)
|
|
77
|
+
[](https://codecov.io/gh/jainal09/envdrift)
|
|
78
|
+
[](https://sloc.xyz/github/jainal09/envdrift)
|
|
79
|
+
|
|
80
|
+
**Prevent environment variable drift between dev, staging, and production.**
|
|
81
|
+
|
|
82
|
+
## The Problem
|
|
83
|
+
|
|
84
|
+
- A missing `DATABASE_URL` in production causes a 3am outage
|
|
85
|
+
- Staging has `NEW_FEATURE_FLAG=true` but production doesn't
|
|
86
|
+
- "It works on my machine!" becomes your team's motto
|
|
87
|
+
|
|
88
|
+
## The Solution
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
# Validate .env against Pydantic schema
|
|
92
|
+
envdrift validate .env --schema config.settings:Settings
|
|
93
|
+
|
|
94
|
+
# Compare dev vs prod
|
|
95
|
+
envdrift diff .env.development .env.production
|
|
96
|
+
|
|
97
|
+
# Check encryption status
|
|
98
|
+
envdrift encrypt .env.production --check
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
## Installation
|
|
102
|
+
|
|
103
|
+
```bash
|
|
104
|
+
pip install envdrift
|
|
105
|
+
```
|
|
106
|
+
|
|
107
|
+
## Quick Start
|
|
108
|
+
|
|
109
|
+
**Define your schema:**
|
|
110
|
+
|
|
111
|
+
```python
|
|
112
|
+
from pydantic import Field
|
|
113
|
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
114
|
+
|
|
115
|
+
class Settings(BaseSettings):
|
|
116
|
+
model_config = SettingsConfigDict(extra="forbid")
|
|
117
|
+
|
|
118
|
+
DATABASE_URL: str = Field(json_schema_extra={"sensitive": True})
|
|
119
|
+
API_KEY: str = Field(json_schema_extra={"sensitive": True})
|
|
120
|
+
DEBUG: bool = False
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
**Validate:**
|
|
124
|
+
|
|
125
|
+
```bash
|
|
126
|
+
envdrift validate .env --schema config.settings:Settings
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
## Features
|
|
130
|
+
|
|
131
|
+
| Feature | envdrift |
|
|
132
|
+
|----------------------|------------------------|
|
|
133
|
+
| Schema validation | Pydantic-based |
|
|
134
|
+
| Cross-env diff | Yes |
|
|
135
|
+
| Pre-commit hooks | Yes |
|
|
136
|
+
| Encryption (dotenvx) | Yes |
|
|
137
|
+
| Vault integration | Azure, AWS, HashiCorp |
|
|
138
|
+
| CI/CD mode | Yes |
|
|
139
|
+
|
|
140
|
+
## Documentation
|
|
141
|
+
|
|
142
|
+
Full documentation: **[jainal09.github.io/envdrift](https://jainal09.github.io/envdrift)**
|
|
143
|
+
|
|
144
|
+
## Development
|
|
145
|
+
|
|
146
|
+
```bash
|
|
147
|
+
git clone https://github.com/jainal09/envdrift.git
|
|
148
|
+
cd envdrift
|
|
149
|
+
make dev
|
|
150
|
+
make test
|
|
151
|
+
make docs-serve
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
## License
|
|
155
|
+
|
|
156
|
+
MIT
|
envdrift-3.1.3/README.md
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/jainal09/envdrift/main/docs/assets/images/env-drift-logo.png" alt="envdrift logo" width="300">
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# envdrift
|
|
6
|
+
|
|
7
|
+
[](https://badge.fury.io/py/envdrift)
|
|
8
|
+
[](https://www.python.org/downloads/)
|
|
9
|
+
[](https://opensource.org/licenses/MIT)
|
|
10
|
+
[](https://jainal09.github.io/envdrift)
|
|
11
|
+
[](https://github.com/astral-sh/ruff)
|
|
12
|
+
[](https://github.com/facebook/pyrefly)
|
|
13
|
+
[](https://codecov.io/gh/jainal09/envdrift)
|
|
14
|
+
[](https://sloc.xyz/github/jainal09/envdrift)
|
|
15
|
+
|
|
16
|
+
**Prevent environment variable drift between dev, staging, and production.**
|
|
17
|
+
|
|
18
|
+
## The Problem
|
|
19
|
+
|
|
20
|
+
- A missing `DATABASE_URL` in production causes a 3am outage
|
|
21
|
+
- Staging has `NEW_FEATURE_FLAG=true` but production doesn't
|
|
22
|
+
- "It works on my machine!" becomes your team's motto
|
|
23
|
+
|
|
24
|
+
## The Solution
|
|
25
|
+
|
|
26
|
+
```bash
|
|
27
|
+
# Validate .env against Pydantic schema
|
|
28
|
+
envdrift validate .env --schema config.settings:Settings
|
|
29
|
+
|
|
30
|
+
# Compare dev vs prod
|
|
31
|
+
envdrift diff .env.development .env.production
|
|
32
|
+
|
|
33
|
+
# Check encryption status
|
|
34
|
+
envdrift encrypt .env.production --check
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Installation
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
pip install envdrift
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## Quick Start
|
|
44
|
+
|
|
45
|
+
**Define your schema:**
|
|
46
|
+
|
|
47
|
+
```python
|
|
48
|
+
from pydantic import Field
|
|
49
|
+
from pydantic_settings import BaseSettings, SettingsConfigDict
|
|
50
|
+
|
|
51
|
+
class Settings(BaseSettings):
|
|
52
|
+
model_config = SettingsConfigDict(extra="forbid")
|
|
53
|
+
|
|
54
|
+
DATABASE_URL: str = Field(json_schema_extra={"sensitive": True})
|
|
55
|
+
API_KEY: str = Field(json_schema_extra={"sensitive": True})
|
|
56
|
+
DEBUG: bool = False
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Validate:**
|
|
60
|
+
|
|
61
|
+
```bash
|
|
62
|
+
envdrift validate .env --schema config.settings:Settings
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
## Features
|
|
66
|
+
|
|
67
|
+
| Feature | envdrift |
|
|
68
|
+
|----------------------|------------------------|
|
|
69
|
+
| Schema validation | Pydantic-based |
|
|
70
|
+
| Cross-env diff | Yes |
|
|
71
|
+
| Pre-commit hooks | Yes |
|
|
72
|
+
| Encryption (dotenvx) | Yes |
|
|
73
|
+
| Vault integration | Azure, AWS, HashiCorp |
|
|
74
|
+
| CI/CD mode | Yes |
|
|
75
|
+
|
|
76
|
+
## Documentation
|
|
77
|
+
|
|
78
|
+
Full documentation: **[jainal09.github.io/envdrift](https://jainal09.github.io/envdrift)**
|
|
79
|
+
|
|
80
|
+
## Development
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
git clone https://github.com/jainal09/envdrift.git
|
|
84
|
+
cd envdrift
|
|
85
|
+
make dev
|
|
86
|
+
make test
|
|
87
|
+
make docs-serve
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
## License
|
|
91
|
+
|
|
92
|
+
MIT
|
|
Binary file
|