cloudsnorkel.cdk-turbo-layers 0.2.4__py3-none-any.whl → 0.3.0__py3-none-any.whl

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.

Potentially problematic release.


This version of cloudsnorkel.cdk-turbo-layers might be problematic. Click here for more details.

@@ -1,4 +1,4 @@
1
- '''
1
+ r'''
2
2
  # Turbo Layers for CDK
3
3
 
4
4
  [![NPM](https://img.shields.io/npm/v/@cloudsnorkel/cdk-turbo-layers?label=npm&logo=npm)](https://www.npmjs.com/package/@cloudsnorkel/cdk-turbo-layers)
@@ -176,6 +176,9 @@ All these examples are for Python, but the same API is available for Node.js, Ru
176
176
  * [lovage](https://github.com/CloudSnorkel/lovage): standalone Python framework that uses the same trick to deploy decorated functions to AWS
177
177
  * [serverless-pydeps](https://github.com/CloudSnorkel/serverless-pydeps): plugin for [Serverless Framework](https://www.serverless.com/) that speeds up deployment
178
178
  '''
179
+ from pkgutil import extend_path
180
+ __path__ = extend_path(__path__, __name__)
181
+
179
182
  import abc
180
183
  import builtins
181
184
  import datetime
@@ -186,7 +189,22 @@ import jsii
186
189
  import publication
187
190
  import typing_extensions
188
191
 
189
- from typeguard import check_type
192
+ import typeguard
193
+ from importlib.metadata import version as _metadata_package_version
194
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
195
+
196
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
197
+ if TYPEGUARD_MAJOR_VERSION <= 2:
198
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
199
+ else:
200
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
201
+ pass
202
+ else:
203
+ if TYPEGUARD_MAJOR_VERSION == 3:
204
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
205
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
206
+ else:
207
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
190
208
 
191
209
  from ._jsii import *
192
210
 
@@ -227,12 +245,12 @@ class DependencyPackagerProps:
227
245
  ) -> None:
228
246
  '''
229
247
  :param architecture: (experimental) Target Lambda architecture. Packages will be installed for this architecture so make sure it fits your Lambda functions.
230
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
248
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
231
249
  :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
232
250
  :param preinstall_commands: (experimental) Additional commands to run before installing packages. Use this to authenticate your package repositories like CodeArtifact. Default: []
233
251
  :param runtime: (experimental) Target Lambda runtime. Packages will be installed for this runtime so make sure it fits your Lambda functions.
234
252
  :param subnet_selection: (experimental) VPC subnets used for packager. Default: default subnets, if VPC is used
235
- :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA}
253
+ :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA }
236
254
  :param vpc: (experimental) VPC used for packager. Use this if your package repositories are only available from within a VPC. Default: no VPC
237
255
 
238
256
  :stability: experimental
@@ -284,7 +302,7 @@ class DependencyPackagerProps:
284
302
  def log_removal_policy(self) -> typing.Optional[_aws_cdk_ceddda9d.RemovalPolicy]:
285
303
  '''(experimental) Removal policy for logs of image builds.
286
304
 
287
- If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed.
305
+ If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed.
288
306
 
289
307
  We try to not leave anything behind when removed. But sometimes a log staying behind is useful.
290
308
 
@@ -355,7 +373,7 @@ class DependencyPackagerProps:
355
373
 
356
374
  Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions.
357
375
 
358
- :default: {@link DependencyPackagerType.LAMBDA}
376
+ :default: {@link DependencyPackagerType.LAMBDA }
359
377
 
360
378
  :stability: experimental
361
379
  '''
@@ -443,12 +461,12 @@ class JavaDependencyPackager(
443
461
  :param scope: -
444
462
  :param id: -
445
463
  :param architecture: (experimental) Target Lambda architecture. Packages will be installed for this architecture so make sure it fits your Lambda functions.
446
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
464
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
447
465
  :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
448
466
  :param preinstall_commands: (experimental) Additional commands to run before installing packages. Use this to authenticate your package repositories like CodeArtifact. Default: []
449
467
  :param runtime: (experimental) Target Lambda runtime. Packages will be installed for this runtime so make sure it fits your Lambda functions.
450
468
  :param subnet_selection: (experimental) VPC subnets used for packager. Default: default subnets, if VPC is used
451
- :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA}
469
+ :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA }
452
470
  :param vpc: (experimental) VPC used for packager. Use this if your package repositories are only available from within a VPC. Default: no VPC
453
471
 
454
472
  :stability: experimental
@@ -588,12 +606,12 @@ class NodejsDependencyPackager(
588
606
  :param scope: -
589
607
  :param id: -
590
608
  :param architecture: (experimental) Target Lambda architecture. Packages will be installed for this architecture so make sure it fits your Lambda functions.
591
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
609
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
592
610
  :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
593
611
  :param preinstall_commands: (experimental) Additional commands to run before installing packages. Use this to authenticate your package repositories like CodeArtifact. Default: []
594
612
  :param runtime: (experimental) Target Lambda runtime. Packages will be installed for this runtime so make sure it fits your Lambda functions.
595
613
  :param subnet_selection: (experimental) VPC subnets used for packager. Default: default subnets, if VPC is used
596
- :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA}
614
+ :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA }
597
615
  :param vpc: (experimental) VPC used for packager. Use this if your package repositories are only available from within a VPC. Default: no VPC
598
616
 
599
617
  :stability: experimental
@@ -737,12 +755,12 @@ class PythonDependencyPackager(
737
755
  :param scope: -
738
756
  :param id: -
739
757
  :param architecture: (experimental) Target Lambda architecture. Packages will be installed for this architecture so make sure it fits your Lambda functions.
740
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
758
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
741
759
  :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
742
760
  :param preinstall_commands: (experimental) Additional commands to run before installing packages. Use this to authenticate your package repositories like CodeArtifact. Default: []
743
761
  :param runtime: (experimental) Target Lambda runtime. Packages will be installed for this runtime so make sure it fits your Lambda functions.
744
762
  :param subnet_selection: (experimental) VPC subnets used for packager. Default: default subnets, if VPC is used
745
- :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA}
763
+ :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA }
746
764
  :param vpc: (experimental) VPC used for packager. Use this if your package repositories are only available from within a VPC. Default: no VPC
747
765
 
748
766
  :stability: experimental
@@ -910,12 +928,12 @@ class RubyDependencyPackager(
910
928
  :param scope: -
911
929
  :param id: -
912
930
  :param architecture: (experimental) Target Lambda architecture. Packages will be installed for this architecture so make sure it fits your Lambda functions.
913
- :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way the CodeBuild logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
931
+ :param log_removal_policy: (experimental) Removal policy for logs of image builds. If deployment fails on the custom resource, try setting this to ``RemovalPolicy.RETAIN``. This way logs can still be viewed, and you can see why the build failed. We try to not leave anything behind when removed. But sometimes a log staying behind is useful. Default: RemovalPolicy.DESTROY
914
932
  :param log_retention: (experimental) The number of days log events are kept in CloudWatch Logs. When updating this property, unsetting it doesn't remove the log retention policy. To remove the retention policy, set the value to ``INFINITE``. Default: logs.RetentionDays.ONE_MONTH
915
933
  :param preinstall_commands: (experimental) Additional commands to run before installing packages. Use this to authenticate your package repositories like CodeArtifact. Default: []
916
934
  :param runtime: (experimental) Target Lambda runtime. Packages will be installed for this runtime so make sure it fits your Lambda functions.
917
935
  :param subnet_selection: (experimental) VPC subnets used for packager. Default: default subnets, if VPC is used
918
- :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA}
936
+ :param type: (experimental) Type of dependency packager. Use Lambda for speed and CodeBuild for complex dependencies that require building native extensions. Default: {@link DependencyPackagerType.LAMBDA }
919
937
  :param vpc: (experimental) VPC used for packager. Use this if your package repositories are only available from within a VPC. Default: no VPC
920
938
 
921
939
  :stability: experimental
@@ -1,3 +1,6 @@
1
+ from pkgutil import extend_path
2
+ __path__ = extend_path(__path__, __name__)
3
+
1
4
  import abc
2
5
  import builtins
3
6
  import datetime
@@ -8,16 +11,31 @@ import jsii
8
11
  import publication
9
12
  import typing_extensions
10
13
 
11
- from typeguard import check_type
14
+ import typeguard
15
+ from importlib.metadata import version as _metadata_package_version
16
+ TYPEGUARD_MAJOR_VERSION = int(_metadata_package_version('typeguard').split('.')[0])
17
+
18
+ def check_type(argname: str, value: object, expected_type: typing.Any) -> typing.Any:
19
+ if TYPEGUARD_MAJOR_VERSION <= 2:
20
+ return typeguard.check_type(argname=argname, value=value, expected_type=expected_type) # type:ignore
21
+ else:
22
+ if isinstance(value, jsii._reference_map.InterfaceDynamicProxy): # pyright: ignore [reportAttributeAccessIssue]
23
+ pass
24
+ else:
25
+ if TYPEGUARD_MAJOR_VERSION == 3:
26
+ typeguard.config.collection_check_strategy = typeguard.CollectionCheckStrategy.ALL_ITEMS # type:ignore
27
+ typeguard.check_type(value=value, expected_type=expected_type) # type:ignore
28
+ else:
29
+ typeguard.check_type(value=value, expected_type=expected_type, collection_check_strategy=typeguard.CollectionCheckStrategy.ALL_ITEMS) # type:ignore
12
30
 
13
31
  import aws_cdk._jsii
14
32
  import constructs._jsii
15
33
 
16
34
  __jsii_assembly__ = jsii.JSIIAssembly.load(
17
35
  "@cloudsnorkel/cdk-turbo-layers",
18
- "0.2.4",
36
+ "0.3.0",
19
37
  __name__[0:-6],
20
- "cdk-turbo-layers@0.2.4.jsii.tgz",
38
+ "cdk-turbo-layers@0.3.0.jsii.tgz",
21
39
  )
22
40
 
23
41
  __all__ = [
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: cloudsnorkel.cdk-turbo-layers
3
- Version: 0.2.4
3
+ Version: 0.3.0
4
4
  Summary: Speed-up Lambda function deployment with dependency layers built in AWS
5
5
  Home-page: https://github.com/CloudSnorkel/cdk-turbo-layers.git
6
6
  Author: Amir Szekely<amir@cloudsnorkel.com>
@@ -20,11 +20,11 @@ Classifier: License :: OSI Approved
20
20
  Requires-Python: ~=3.8
21
21
  Description-Content-Type: text/markdown
22
22
  License-File: LICENSE
23
- Requires-Dist: aws-cdk-lib <3.0.0,>=2.87.0
24
- Requires-Dist: constructs <11.0.0,>=10.0.5
25
- Requires-Dist: jsii <2.0.0,>=1.94.0
26
- Requires-Dist: publication >=0.0.3
27
- Requires-Dist: typeguard ~=2.13.3
23
+ Requires-Dist: aws-cdk-lib<3.0.0,>=2.123.0
24
+ Requires-Dist: constructs<11.0.0,>=10.0.5
25
+ Requires-Dist: jsii<2.0.0,>=1.105.0
26
+ Requires-Dist: publication>=0.0.3
27
+ Requires-Dist: typeguard<4.3.0,>=2.13.3
28
28
 
29
29
  # Turbo Layers for CDK
30
30
 
@@ -0,0 +1,9 @@
1
+ cloudsnorkel/cdk_turbo_layers/__init__.py,sha256=3dYMbM9gt85NTkCxevMlezr65Xwc7F6JYX8iFlDakqk,57832
2
+ cloudsnorkel/cdk_turbo_layers/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
+ cloudsnorkel/cdk_turbo_layers/_jsii/__init__.py,sha256=Tdv82VtBoJ-opdWH38PaQ-M8iPmK7tt7shiGAcCji4c,1470
4
+ cloudsnorkel/cdk_turbo_layers/_jsii/cdk-turbo-layers@0.3.0.jsii.tgz,sha256=y1ey0vdpOlav6XReTaFnrNu6a2CkahWvxjQ-QIX5KVE,339152
5
+ cloudsnorkel.cdk_turbo_layers-0.3.0.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
+ cloudsnorkel.cdk_turbo_layers-0.3.0.dist-info/METADATA,sha256=k_YTx3rtm0IO8OaQddgvpPuJULLfaDX7RNouDx7Na_w,9700
7
+ cloudsnorkel.cdk_turbo_layers-0.3.0.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
8
+ cloudsnorkel.cdk_turbo_layers-0.3.0.dist-info/top_level.txt,sha256=6vUrT-dcGOiRMT4Q6gEQPznoyS7nHOJ269MHpo4DEd8,13
9
+ cloudsnorkel.cdk_turbo_layers-0.3.0.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: bdist_wheel (0.42.0)
2
+ Generator: bdist_wheel (0.45.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
@@ -1,9 +0,0 @@
1
- cloudsnorkel/cdk_turbo_layers/__init__.py,sha256=JZVvuz5qSTJqRoLsLaKd10OkC296AjSrNZJ3C7s0-v0,56865
2
- cloudsnorkel/cdk_turbo_layers/py.typed,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1
3
- cloudsnorkel/cdk_turbo_layers/_jsii/__init__.py,sha256=RPDfjyncpgsPXlgezM1obPQI-SXEaghSLw0JhSMvF1s,426
4
- cloudsnorkel/cdk_turbo_layers/_jsii/cdk-turbo-layers@0.2.4.jsii.tgz,sha256=RHYeGN3-bwdiNHGQtEdsrV9XE2Z0Zp5Xg3umyM-j61Q,329465
5
- cloudsnorkel.cdk_turbo_layers-0.2.4.dist-info/LICENSE,sha256=z8d0m5b2O9McPEK1xHG_dWgUBT6EfBDz6wA0F7xSPTA,11358
6
- cloudsnorkel.cdk_turbo_layers-0.2.4.dist-info/METADATA,sha256=5pDRYFD9nzTn8OI52JCYHcKQOuivky0FBNSAlwTDLNc,9696
7
- cloudsnorkel.cdk_turbo_layers-0.2.4.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
8
- cloudsnorkel.cdk_turbo_layers-0.2.4.dist-info/top_level.txt,sha256=6vUrT-dcGOiRMT4Q6gEQPznoyS7nHOJ269MHpo4DEd8,13
9
- cloudsnorkel.cdk_turbo_layers-0.2.4.dist-info/RECORD,,