aws-lambda-env-modeler 2.0.0__tar.gz → 2.0.1__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.
@@ -0,0 +1,253 @@
1
+
2
+ # Created by https://www.gitignore.io/api/osx,linux,python,windows,pycharm,visualstudiocode
3
+
4
+ ### Linux ###
5
+ *~
6
+
7
+ # temporary files which can be created if a process still has a handle open of a deleted file
8
+ .fuse_hidden*
9
+
10
+ # KDE directory preferences
11
+ .directory
12
+
13
+ # Linux trash folder which might appear on any partition or disk
14
+ .Trash-*
15
+
16
+ # .nfs files are created when an open file is removed but is still being accessed
17
+ .nfs*
18
+
19
+ ### OSX ###
20
+ *.DS_Store
21
+ .AppleDouble
22
+ .LSOverride
23
+
24
+ # Icon must end with two \r
25
+ Icon
26
+
27
+ # Thumbnails
28
+ ._*
29
+
30
+ # Files that might appear in the root of a volume
31
+ .DocumentRevisions-V100
32
+ .fseventsd
33
+ .Spotlight-V100
34
+ .TemporaryItems
35
+ .Trashes
36
+ .VolumeIcon.icns
37
+ .com.apple.timemachine.donotpresent
38
+
39
+ # Directories potentially created on remote AFP share
40
+ .AppleDB
41
+ .AppleDesktop
42
+ Network Trash Folder
43
+ Temporary Items
44
+ .apdisk
45
+
46
+ ### PyCharm ###
47
+ # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
48
+ # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
49
+
50
+ # User-specific stuff:
51
+ .idea/**/workspace.xml
52
+ .idea/**/tasks.xml
53
+ .idea/dictionaries
54
+
55
+ # Sensitive or high-churn files:
56
+ .idea/**/dataSources/
57
+ .idea/**/dataSources.ids
58
+ .idea/**/dataSources.xml
59
+ .idea/**/dataSources.local.xml
60
+ .idea/**/sqlDataSources.xml
61
+ .idea/**/dynamic.xml
62
+ .idea/**/uiDesigner.xml
63
+
64
+ # Gradle:
65
+ .idea/**/gradle.xml
66
+ .idea/**/libraries
67
+
68
+ # CMake
69
+ cmake-build-debug/
70
+
71
+ # Mongo Explorer plugin:
72
+ .idea/**/mongoSettings.xml
73
+
74
+ ## File-based project format:
75
+ *.iws
76
+
77
+ ## Plugin-specific files:
78
+
79
+ # IntelliJ
80
+ /out/
81
+
82
+ # mpeltonen/sbt-idea plugin
83
+ .idea_modules/
84
+
85
+ # JIRA plugin
86
+ atlassian-ide-plugin.xml
87
+
88
+ # Cursive Clojure plugin
89
+ .idea/replstate.xml
90
+
91
+ # Ruby plugin and RubyMine
92
+ /.rakeTasks
93
+
94
+ # Crashlytics plugin (for Android Studio and IntelliJ)
95
+ com_crashlytics_export_strings.xml
96
+ crashlytics.properties
97
+ crashlytics-build.properties
98
+ fabric.properties
99
+
100
+ ### PyCharm Patch ###
101
+ # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
102
+
103
+ # *.iml
104
+ # modules.xml
105
+ # .idea/misc.xml
106
+ # *.ipr
107
+
108
+ # Sonarlint plugin
109
+ .idea/sonarlint
110
+
111
+ ### Python ###
112
+ # Byte-compiled / optimized / DLL files
113
+ __pycache__/
114
+ *.py[cod]
115
+ *$py.class
116
+
117
+ # C extensions
118
+ *.so
119
+
120
+ # Distribution / packaging
121
+ .Python
122
+ build/
123
+ develop-eggs/
124
+ dist/
125
+ downloads/
126
+ eggs/
127
+ .eggs/
128
+ lib/
129
+ lib64/
130
+ parts/
131
+ sdist/
132
+ var/
133
+ wheels/
134
+ *.egg-info/
135
+ .installed.cfg
136
+ *.egg
137
+
138
+ # PyInstaller
139
+ # Usually these files are written by a python script from a template
140
+ # before PyInstaller builds the exe, so as to inject date/other infos into it.
141
+ *.manifest
142
+ *.spec
143
+
144
+ # Installer logs
145
+ pip-log.txt
146
+ pip-delete-this-directory.txt
147
+
148
+ # Unit test / coverage reports
149
+ htmlcov/
150
+ .tox/
151
+ .coverage
152
+ .coverage.*
153
+ .cache
154
+ .pytest_cache/
155
+ nosetests.xml
156
+ coverage.xml
157
+ *.cover
158
+ .hypothesis/
159
+
160
+ # Translations
161
+ *.mo
162
+ *.pot
163
+
164
+ # Flask stuff:
165
+ instance/
166
+ .webassets-cache
167
+
168
+ # Scrapy stuff:
169
+ .scrapy
170
+
171
+ # Sphinx documentation
172
+ docs/_build/
173
+
174
+ # PyBuilder
175
+ target/
176
+
177
+ # Jupyter Notebook
178
+ .ipynb_checkpoints
179
+
180
+ # pyenv
181
+ .python-version
182
+
183
+ # celery beat schedule file
184
+ celerybeat-schedule.*
185
+
186
+ # SageMath parsed files
187
+ *.sage.py
188
+
189
+ # Environments
190
+ .env
191
+ .venv
192
+ env/
193
+ venv/
194
+ ENV/
195
+ env.bak/
196
+ venv.bak/
197
+
198
+ # Spyder project settings
199
+ .spyderproject
200
+ .spyproject
201
+
202
+ # Rope project settings
203
+ .ropeproject
204
+
205
+ # mkdocs documentation
206
+ /site
207
+
208
+ # mypy
209
+ .mypy_cache/
210
+
211
+ ### VisualStudioCode ###
212
+ .vscode/*
213
+ !.vscode/settings.json
214
+ !.vscode/tasks.json
215
+ !.vscode/launch.json
216
+ !.vscode/extensions.json
217
+ .history
218
+
219
+ ### Windows ###
220
+ # Windows thumbnail cache files
221
+ Thumbs.db
222
+ ehthumbs.db
223
+ ehthumbs_vista.db
224
+
225
+ # Folder config file
226
+ Desktop.ini
227
+
228
+ # Recycle Bin used on file shares
229
+ $RECYCLE.BIN/
230
+
231
+ # Windows Installer files
232
+ *.cab
233
+ *.msi
234
+ *.msm
235
+ *.msp
236
+
237
+ # Windows shortcuts
238
+ *.lnk
239
+
240
+ # Build folder
241
+
242
+ */build/*
243
+
244
+ # End of https://www.gitignore.io/api/osx,linux,python,windows,pycharm,visualstudiocode
245
+ .coverage
246
+ cdk.out
247
+ .build
248
+ .vscode
249
+ lib_requirements.txt
250
+ .dccache
251
+ .ruff_cache
252
+ .poetry
253
+ .pytest_cache
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2023 Ran Isenberg
3
+ Copyright (c) 2025 Ran Isenberg
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -1,27 +1,25 @@
1
- Metadata-Version: 2.1
1
+ Metadata-Version: 2.4
2
2
  Name: aws_lambda_env_modeler
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: AWS-Lambda-Env-Modeler is a Python library designed to simplify the process of managing and validating environment variables in your AWS Lambda functions.
5
- Home-page: https://github.com/ran-isenberg/aws-lambda-env-modeler
6
- License: MIT-0
7
- Keywords: environment variables parser,aws lambda,serverless best practices,aws serverless,lambda environment variables
5
+ Project-URL: Repository, https://github.com/ran-isenberg/aws-lambda-env-modeler
6
+ Project-URL: Issue tracker, https://github.com/ran-isenberg/aws-lambda-env-modeler/issues
7
+ Project-URL: Releases, https://github.com/ran-isenberg/aws-lambda-env-modeler/releases
8
8
  Author: Ran Isenberg
9
- Requires-Python: >=3.9.0,<4.0.0
9
+ License-Expression: MIT-0
10
+ License-File: LICENSE
11
+ Keywords: aws lambda,aws serverless,environment variables parser,lambda environment variables,serverless best practices
10
12
  Classifier: Development Status :: 5 - Production/Stable
11
13
  Classifier: Intended Audience :: Developers
12
- Classifier: License :: OSI Approved
13
14
  Classifier: License :: OSI Approved :: MIT License
14
15
  Classifier: Natural Language :: English
15
- Classifier: Programming Language :: Python :: 3
16
16
  Classifier: Programming Language :: Python :: 3.9
17
17
  Classifier: Programming Language :: Python :: 3.10
18
18
  Classifier: Programming Language :: Python :: 3.11
19
19
  Classifier: Programming Language :: Python :: 3.12
20
20
  Classifier: Programming Language :: Python :: 3.13
21
- Requires-Dist: pydantic (>=2.0.0,<3.0.0)
22
- Project-URL: Issue tracker, https://github.com/ran-isenberg/aws-lambda-env-modeler/issues
23
- Project-URL: Repository, https://github.com/ran-isenberg/aws-lambda-env-modeler
24
- Project-URL: Releases, https://github.com/ran-isenberg/aws-lambda-env-modeler/releases
21
+ Requires-Python: <4,>=3.9.0
22
+ Requires-Dist: pydantic<3,>=2.0.0
25
23
  Description-Content-Type: text/markdown
26
24
 
27
25
 
@@ -31,7 +29,8 @@ Description-Content-Type: text/markdown
31
29
  ![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.9|%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python)
32
30
  ![PyPI version](https://badge.fury.io/py/aws-lambda-env-modeler.svg)
33
31
  ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-env-modeler)
34
- [![codecov](https://codecov.io/gh/ran-isenberg/aws-lambda-env-modeler/branch/main/graph/badge.svg?token=P2K7K4KICF)](https://codecov.io/gh/ran-isenberg/aws-lambda-env-modeler)
32
+ [![PyPI Downloads](https://static.pepy.tech/badge/aws-lambda-env-modeler)](https://pepy.tech/projects/aws-lambda-env-modeler)
33
+ [![codecov](https://codecov.io/github/ran-isenberg/aws-lambda-env-modeler/graph/badge.svg?token=1UaIXTcvGr)](https://codecov.io/github/ran-isenberg/aws-lambda-env-modeler)
35
34
  ![version](https://img.shields.io/github/v/release/ran-isenberg/aws-lambda-env-modeler)
36
35
  ![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ran-isenberg/aws-lambda-env-modeler/badge)
37
36
  ![issues](https://img.shields.io/github/issues/ran-isenberg/aws-lambda-env-modeler)
@@ -179,8 +178,8 @@ Read our code of conduct [here.](https://github.com/ran-isenberg/aws-lambda-env-
179
178
  * Blog Website [RanTheBuilder](https://www.ranthebuilder.cloud)
180
179
  * LinkedIn: [ranisenberg](https://www.linkedin.com/in/ranisenberg/)
181
180
  * Twitter: [RanBuilder](https://twitter.com/RanBuilder)
181
+ * Bluesky: [@ranthebuilder.cloud](https://bsky.app/profile/ranthebuilder.cloud)
182
182
 
183
183
 
184
184
  ## License
185
185
  This library is licensed under the MIT License. See the [LICENSE](https://github.com/ran-isenberg/aws-lambda-env-modeler/blob/main/LICENSE) file.
186
-
@@ -5,7 +5,8 @@
5
5
  ![PythonSupport](https://img.shields.io/static/v1?label=python&message=%203.9|%203.10|%203.11|%203.12|%203.13&color=blue?style=flat-square&logo=python)
6
6
  ![PyPI version](https://badge.fury.io/py/aws-lambda-env-modeler.svg)
7
7
  ![PyPi monthly downloads](https://img.shields.io/pypi/dm/aws-lambda-env-modeler)
8
- [![codecov](https://codecov.io/gh/ran-isenberg/aws-lambda-env-modeler/branch/main/graph/badge.svg?token=P2K7K4KICF)](https://codecov.io/gh/ran-isenberg/aws-lambda-env-modeler)
8
+ [![PyPI Downloads](https://static.pepy.tech/badge/aws-lambda-env-modeler)](https://pepy.tech/projects/aws-lambda-env-modeler)
9
+ [![codecov](https://codecov.io/github/ran-isenberg/aws-lambda-env-modeler/graph/badge.svg?token=1UaIXTcvGr)](https://codecov.io/github/ran-isenberg/aws-lambda-env-modeler)
9
10
  ![version](https://img.shields.io/github/v/release/ran-isenberg/aws-lambda-env-modeler)
10
11
  ![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/ran-isenberg/aws-lambda-env-modeler/badge)
11
12
  ![issues](https://img.shields.io/github/issues/ran-isenberg/aws-lambda-env-modeler)
@@ -153,6 +154,7 @@ Read our code of conduct [here.](https://github.com/ran-isenberg/aws-lambda-env-
153
154
  * Blog Website [RanTheBuilder](https://www.ranthebuilder.cloud)
154
155
  * LinkedIn: [ranisenberg](https://www.linkedin.com/in/ranisenberg/)
155
156
  * Twitter: [RanBuilder](https://twitter.com/RanBuilder)
157
+ * Bluesky: [@ranthebuilder.cloud](https://bsky.app/profile/ranthebuilder.cloud)
156
158
 
157
159
 
158
160
  ## License
@@ -5,7 +5,7 @@ from aws_lambda_env_modeler.modeler_impl import __get_environment_variables_impl
5
5
  from aws_lambda_env_modeler.types import Model
6
6
 
7
7
 
8
- def init_environment_variables(model: Type[Model]):
8
+ def init_environment_variables(model: Type[Model]) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
9
9
  """
10
10
  A decorator for AWS Lambda handler functions. It initializes and validates environment variables based on the provided Pydantic model before the execution of the decorated function.
11
11
  It uses LRU Cache by model class type to optimize parsing time. Cache can be disabled by setting the environment variable 'LAMBDA_ENV_MODELER_DISABLE_CACHE' to FALSE (default: cache is enabled)
@@ -20,9 +20,9 @@ def init_environment_variables(model: Type[Model]):
20
20
  ValueError: If the environment variables do not align with the model's structure or fail validation.
21
21
  """
22
22
 
23
- def decorator(lambda_handler_function: Callable):
23
+ def decorator(lambda_handler_function: Callable[..., Any]) -> Callable[..., Any]:
24
24
  @wraps(lambda_handler_function)
25
- def wrapper(event: Dict[str, Any], context, **kwargs):
25
+ def wrapper(event: Dict[str, Any], context: Any, **kwargs: Any) -> Any:
26
26
  # Initialize and validate environment variables before executing the lambda handler function
27
27
  __get_environment_variables_impl(model)
28
28
  return lambda_handler_function(event, context, **kwargs)
@@ -1,9 +1,23 @@
1
- [tool.poetry]
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project]
2
6
  name = "aws_lambda_env_modeler"
3
- version = "2.0.0"
7
+ version = "2.0.1"
4
8
  description = "AWS-Lambda-Env-Modeler is a Python library designed to simplify the process of managing and validating environment variables in your AWS Lambda functions."
5
- authors = ["Ran Isenberg"]
6
- classifiers=[
9
+ authors = [{ name = "Ran Isenberg" }]
10
+ requires-python = ">=3.9.0,<4"
11
+ readme = "README.md"
12
+ license = "MIT-0"
13
+ keywords = [
14
+ "environment variables parser",
15
+ "aws lambda",
16
+ "serverless best practices",
17
+ "aws serverless",
18
+ "lambda environment variables",
19
+ ]
20
+ classifiers = [
7
21
  "Development Status :: 5 - Production/Stable",
8
22
  "Intended Audience :: Developers",
9
23
  "License :: OSI Approved :: MIT License",
@@ -14,43 +28,42 @@ classifiers=[
14
28
  "Programming Language :: Python :: 3.12",
15
29
  "Programming Language :: Python :: 3.13",
16
30
  ]
17
- repository="https://github.com/ran-isenberg/aws-lambda-env-modeler"
18
- readme = "README.md"
19
- keywords = ["environment variables parser", "aws lambda", "serverless best practices", "aws serverless", "lambda environment variables"]
20
- license = "MIT-0"
21
- packages = [
22
- { include = "aws_lambda_env_modeler" }]
31
+ dependencies = ["pydantic>=2.0.0,<3"]
23
32
 
24
- [tool.poetry.urls]
33
+ [project.urls]
34
+ Repository = "https://github.com/ran-isenberg/aws-lambda-env-modeler"
25
35
  "Issue tracker" = "https://github.com/ran-isenberg/aws-lambda-env-modeler/issues"
26
- "Releases" = "https://github.com/ran-isenberg/aws-lambda-env-modeler/releases"
36
+ Releases = "https://github.com/ran-isenberg/aws-lambda-env-modeler/releases"
27
37
 
38
+ [dependency-groups]
39
+ dev = [
40
+ "pytest",
41
+ "pytest-mock",
42
+ "pycodestyle",
43
+ "pytest-cov",
44
+ "pytest-html",
45
+ "python-dateutil",
46
+ "python-dotenv",
47
+ "GitPython",
48
+ "radon",
49
+ "xenon",
50
+ "pre-commit",
51
+ "ruff",
52
+ "mkdocs-material",
53
+ "mkdocs-git-revision-date-plugin",
54
+ "types-cachetools",
55
+ "mypy",
56
+ "types-requests",
57
+ "toml",
58
+ "wheel",
59
+ "setuptools",
60
+ ]
28
61
 
29
- [tool.poetry.dependencies]
30
- python = " ^3.9.0 || ^3.10.0 || ^3.11.0 || ^3.12.0 || ^3.13.0"
31
- pydantic = {version = "^2.0.0"}
62
+ [tool.hatch.build.targets.sdist]
63
+ include = ["aws_lambda_env_modeler"]
32
64
 
33
- [tool.poetry.dev-dependencies]
34
- pytest = "*"
35
- pytest-mock = "*"
36
- pycodestyle = "*"
37
- pytest-cov = "*"
38
- pytest-html = "*"
39
- python-dateutil = "*"
40
- python-dotenv = "*"
41
- GitPython = "*"
42
- radon = "*"
43
- xenon = "*"
44
- pre-commit = "*"
45
- ruff = "*"
46
- mkdocs-material = "*"
47
- mkdocs-git-revision-date-plugin = "*"
48
- types-cachetools = "*"
49
- mypy = "*"
50
- types-requests = "*"
51
- toml = "*"
52
- wheel = "*"
53
- setuptools = "*"
65
+ [tool.hatch.build.targets.wheel]
66
+ include = ["aws_lambda_env_modeler"]
54
67
 
55
68
  [tool.ruff]
56
69
  # Exclude a variety of commonly ignored directories.