dagster-aws 0.27.15__py3-none-any.whl → 0.28.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.
@@ -4,15 +4,15 @@ import random
4
4
  import string
5
5
  from collections.abc import Iterator
6
6
  from contextlib import contextmanager
7
- from typing import TYPE_CHECKING
7
+ from typing import TYPE_CHECKING, Optional
8
8
 
9
- import boto3
10
9
  import dagster._check as check
11
10
  from dagster._core.pipes.client import PipesContextInjector, PipesParams
12
11
  from dagster._core.pipes.utils import PipesEnvContextInjector
13
12
 
14
13
  if TYPE_CHECKING:
15
14
  from dagster_pipes import PipesContextData
15
+ from mypy_boto3_s3 import S3Client
16
16
 
17
17
  _CONTEXT_FILENAME = "context.json"
18
18
 
@@ -22,20 +22,21 @@ class PipesS3ContextInjector(PipesContextInjector):
22
22
 
23
23
  Args:
24
24
  bucket (str): The S3 bucket to write to.
25
- client (boto3.client): A boto3 client to use to write to S3.
25
+ client (S3Client): A boto3 client to use to write to S3.
26
26
  key_prefix (Optional[str]): An optional prefix to use for the S3 key. Defaults to a random
27
27
  string.
28
28
 
29
29
  """
30
30
 
31
- def __init__(self, *, bucket: str, client: boto3.client): # pyright: ignore (reportGeneralTypeIssues)
31
+ def __init__(self, *, bucket: str, client: "S3Client", key_prefix: Optional[str] = None):
32
32
  super().__init__()
33
33
  self.bucket = check.str_param(bucket, "bucket")
34
34
  self.client = client
35
+ self.key_prefix = key_prefix
35
36
 
36
37
  @contextmanager
37
38
  def inject_context(self, context: "PipesContextData") -> Iterator[PipesParams]: # pyright: ignore[reportIncompatibleMethodOverride]
38
- key_prefix = "".join(random.choices(string.ascii_letters, k=30))
39
+ key_prefix = f"{self.key_prefix or ''}{''.join(random.choices(string.ascii_letters, k=30))}"
39
40
  key = os.path.join(key_prefix, _CONTEXT_FILENAME)
40
41
  self.client.put_object(
41
42
  Body=json.dumps(context).encode("utf-8"), Bucket=self.bucket, Key=key
dagster_aws/version.py CHANGED
@@ -1 +1 @@
1
- __version__ = "0.27.15"
1
+ __version__ = "0.28.0"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dagster-aws
3
- Version: 0.27.15
3
+ Version: 0.28.0
4
4
  Summary: Package for AWS-specific Dagster framework solid and resource components.
5
5
  Home-page: https://github.com/dagster-io/dagster/tree/master/python_modules/libraries/dagster-aws
6
6
  Author: Dagster Labs
@@ -16,7 +16,7 @@ Classifier: Operating System :: OS Independent
16
16
  Requires-Python: >=3.9,<3.14
17
17
  License-File: LICENSE
18
18
  Requires-Dist: boto3
19
- Requires-Dist: dagster==1.11.15
19
+ Requires-Dist: dagster==1.12.0
20
20
  Requires-Dist: packaging
21
21
  Requires-Dist: requests
22
22
  Provides-Extra: redshift
@@ -1,7 +1,7 @@
1
1
  dagster_aws/__init__.py,sha256=n5d1NvkQvkVnjWetqKFOLCZUkymTJ0v2WMxLGsbA2Hk,166
2
2
  dagster_aws/_stubs.py,sha256=3C6ve6WLtuT2HtCn50hBAMIz-eEAwcZo4fCVnNxGBQw,1112
3
3
  dagster_aws/py.typed,sha256=la67KBlbjXN-_-DfGNcdOcjYumVpKG_Tkw-8n5dnGB4,8
4
- dagster_aws/version.py,sha256=nh4rkWKwcS4_2NEvEKWozrztgCUEn_1ODIolwNpGd8g,24
4
+ dagster_aws/version.py,sha256=MRQGtOXBhcDKeeNOL0LiB-cllo6kfd8_KGJOvaDp0XQ,23
5
5
  dagster_aws/athena/__init__.py,sha256=J0-QydhSP3pUQk7CawztpaTm3Q1NFEpbubTM1eULbGo,413
6
6
  dagster_aws/athena/resources.py,sha256=h7Md_KQXHvtBHA019WZFzAFTClzEUDItDZNdhR2RrPY,11907
7
7
  dagster_aws/cloudwatch/__init__.py,sha256=iiyLEyTfNMThU4_SNM_Ns7IGXKR7wTKIvOUz9v_RQBA,82
@@ -25,7 +25,7 @@ dagster_aws/emr/pyspark_step_launcher.py,sha256=wjhxww4ECfWHs-znbcn56eTgNqdBIJ9I
25
25
  dagster_aws/emr/types.py,sha256=-JQH3H2niodJuwiyrGW0HqgkV75bD-SRNeXdXuqYY9I,3698
26
26
  dagster_aws/emr/utils.py,sha256=AgxJ8L-uprSyjeJcxFgbMMGLsgqtjcuW11X7mIWi1tI,580
27
27
  dagster_aws/pipes/__init__.py,sha256=FEqfChhBYzJRVxqAV1jfaXecRUgxJaLq4xgy8AKjNkI,895
28
- dagster_aws/pipes/context_injectors.py,sha256=KvBN1CzXz6NOB4RTgDKRwkXbWd_1PPB4j1hCz-wfwNA,2198
28
+ dagster_aws/pipes/context_injectors.py,sha256=DV356jY7k53gB9G--iQjOxx5C7P-ZAxTySbeaMs9gv0,2282
29
29
  dagster_aws/pipes/message_readers.py,sha256=kMYdzDPdYxUqzo_Oms5iknA6ezGN-27oHYU6E3-yK1c,14690
30
30
  dagster_aws/pipes/clients/__init__.py,sha256=p9jEkLonG7gaI0vS6LA_dlZBSk_YSRfH-svT8eU7Myg,564
31
31
  dagster_aws/pipes/clients/ecs.py,sha256=eiEXUbB51cFbnQ5llL6fLjCJ8pFPA0UfuWIghBwnf1g,15482
@@ -59,8 +59,8 @@ dagster_aws/utils/mrjob/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG
59
59
  dagster_aws/utils/mrjob/log4j.py,sha256=Gj2D5USX8swfBXlWf3-NiqeFvrs3h1SGJkOPbP3mke8,4392
60
60
  dagster_aws/utils/mrjob/retry.py,sha256=o8Y1Sgu8ABNnsm9jMCfagJpXmgpjcwDw6ufQmDV_Dus,4805
61
61
  dagster_aws/utils/mrjob/utils.py,sha256=pFKobTkgwPxQoQNlzGzD3jFxwIP-flQOspQxNKGg2dc,3684
62
- dagster_aws-0.27.15.dist-info/licenses/LICENSE,sha256=4lsMW-RCvfVD4_F57wrmpe3vX1xwUk_OAKKmV_XT7Z0,11348
63
- dagster_aws-0.27.15.dist-info/METADATA,sha256=n8jJc9fnjrXEVK9C_Dvq5GjjaWJSqWef_M9XKV0zYSI,1697
64
- dagster_aws-0.27.15.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
- dagster_aws-0.27.15.dist-info/top_level.txt,sha256=-hOwIi00tt_K9eXRhiyjst45X-Ffu5_QCdbKcm8UpDg,12
66
- dagster_aws-0.27.15.dist-info/RECORD,,
62
+ dagster_aws-0.28.0.dist-info/licenses/LICENSE,sha256=4lsMW-RCvfVD4_F57wrmpe3vX1xwUk_OAKKmV_XT7Z0,11348
63
+ dagster_aws-0.28.0.dist-info/METADATA,sha256=923U7KzM7U-7Fa2pb3rCbwI__9JUUc5fHd2liuDc2zA,1695
64
+ dagster_aws-0.28.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
65
+ dagster_aws-0.28.0.dist-info/top_level.txt,sha256=-hOwIi00tt_K9eXRhiyjst45X-Ffu5_QCdbKcm8UpDg,12
66
+ dagster_aws-0.28.0.dist-info/RECORD,,