boto3 1.35.24__tar.gz → 1.35.26__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.
Files changed (72) hide show
  1. {boto3-1.35.24 → boto3-1.35.26}/PKG-INFO +6 -5
  2. {boto3-1.35.24 → boto3-1.35.26}/boto3/__init__.py +1 -1
  3. boto3-1.35.26/boto3/examples/cloudfront.rst +35 -0
  4. boto3-1.35.26/boto3/examples/s3.rst +185 -0
  5. {boto3-1.35.24 → boto3-1.35.26}/boto3.egg-info/PKG-INFO +6 -5
  6. {boto3-1.35.24 → boto3-1.35.26}/boto3.egg-info/SOURCES.txt +2 -0
  7. {boto3-1.35.24 → boto3-1.35.26}/boto3.egg-info/requires.txt +1 -1
  8. {boto3-1.35.24 → boto3-1.35.26}/setup.cfg +1 -1
  9. {boto3-1.35.24 → boto3-1.35.26}/setup.py +1 -1
  10. {boto3-1.35.24 → boto3-1.35.26}/CONTRIBUTING.rst +0 -0
  11. {boto3-1.35.24 → boto3-1.35.26}/LICENSE +0 -0
  12. {boto3-1.35.24 → boto3-1.35.26}/MANIFEST.in +0 -0
  13. {boto3-1.35.24 → boto3-1.35.26}/NOTICE +0 -0
  14. {boto3-1.35.24 → boto3-1.35.26}/README.rst +0 -0
  15. {boto3-1.35.24 → boto3-1.35.26}/boto3/compat.py +0 -0
  16. {boto3-1.35.24 → boto3-1.35.26}/boto3/crt.py +0 -0
  17. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/cloudformation/2010-05-15/resources-1.json +0 -0
  18. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/cloudwatch/2010-08-01/resources-1.json +0 -0
  19. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/dynamodb/2012-08-10/resources-1.json +0 -0
  20. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2014-10-01/resources-1.json +0 -0
  21. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2015-03-01/resources-1.json +0 -0
  22. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2015-04-15/resources-1.json +0 -0
  23. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2015-10-01/resources-1.json +0 -0
  24. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2016-04-01/resources-1.json +0 -0
  25. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2016-09-15/resources-1.json +0 -0
  26. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/ec2/2016-11-15/resources-1.json +0 -0
  27. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/glacier/2012-06-01/resources-1.json +0 -0
  28. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/iam/2010-05-08/resources-1.json +0 -0
  29. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/opsworks/2013-02-18/resources-1.json +0 -0
  30. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/s3/2006-03-01/resources-1.json +0 -0
  31. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/sns/2010-03-31/resources-1.json +0 -0
  32. {boto3-1.35.24 → boto3-1.35.26}/boto3/data/sqs/2012-11-05/resources-1.json +0 -0
  33. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/__init__.py +0 -0
  34. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/action.py +0 -0
  35. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/attr.py +0 -0
  36. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/base.py +0 -0
  37. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/client.py +0 -0
  38. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/collection.py +0 -0
  39. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/docstring.py +0 -0
  40. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/method.py +0 -0
  41. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/resource.py +0 -0
  42. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/service.py +0 -0
  43. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/subresource.py +0 -0
  44. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/utils.py +0 -0
  45. {boto3-1.35.24 → boto3-1.35.26}/boto3/docs/waiter.py +0 -0
  46. {boto3-1.35.24 → boto3-1.35.26}/boto3/dynamodb/__init__.py +0 -0
  47. {boto3-1.35.24 → boto3-1.35.26}/boto3/dynamodb/conditions.py +0 -0
  48. {boto3-1.35.24 → boto3-1.35.26}/boto3/dynamodb/table.py +0 -0
  49. {boto3-1.35.24 → boto3-1.35.26}/boto3/dynamodb/transform.py +0 -0
  50. {boto3-1.35.24 → boto3-1.35.26}/boto3/dynamodb/types.py +0 -0
  51. {boto3-1.35.24 → boto3-1.35.26}/boto3/ec2/__init__.py +0 -0
  52. {boto3-1.35.24 → boto3-1.35.26}/boto3/ec2/createtags.py +0 -0
  53. {boto3-1.35.24 → boto3-1.35.26}/boto3/ec2/deletetags.py +0 -0
  54. {boto3-1.35.24 → boto3-1.35.26}/boto3/exceptions.py +0 -0
  55. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/__init__.py +0 -0
  56. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/action.py +0 -0
  57. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/base.py +0 -0
  58. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/collection.py +0 -0
  59. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/factory.py +0 -0
  60. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/model.py +0 -0
  61. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/params.py +0 -0
  62. {boto3-1.35.24 → boto3-1.35.26}/boto3/resources/response.py +0 -0
  63. {boto3-1.35.24 → boto3-1.35.26}/boto3/s3/__init__.py +0 -0
  64. {boto3-1.35.24 → boto3-1.35.26}/boto3/s3/constants.py +0 -0
  65. {boto3-1.35.24 → boto3-1.35.26}/boto3/s3/inject.py +0 -0
  66. {boto3-1.35.24 → boto3-1.35.26}/boto3/s3/transfer.py +0 -0
  67. {boto3-1.35.24 → boto3-1.35.26}/boto3/session.py +0 -0
  68. {boto3-1.35.24 → boto3-1.35.26}/boto3/utils.py +0 -0
  69. {boto3-1.35.24 → boto3-1.35.26}/boto3.egg-info/dependency_links.txt +0 -0
  70. {boto3-1.35.24 → boto3-1.35.26}/boto3.egg-info/top_level.txt +0 -0
  71. {boto3-1.35.24 → boto3-1.35.26}/pyproject.toml +0 -0
  72. {boto3-1.35.24 → boto3-1.35.26}/requirements.txt +0 -0
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boto3
3
- Version: 1.35.24
3
+ Version: 1.35.26
4
4
  Summary: The AWS SDK for Python
5
5
  Home-page: https://github.com/boto/boto3
6
6
  Author: Amazon Web Services
7
7
  License: Apache License 2.0
8
8
  Project-URL: Documentation, https://boto3.amazonaws.com/v1/documentation/api/latest/index.html
9
9
  Project-URL: Source, https://github.com/boto/boto3
10
- Platform: UNKNOWN
11
10
  Classifier: Development Status :: 5 - Production/Stable
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: Natural Language :: English
@@ -21,9 +20,13 @@ Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Requires-Python: >= 3.8
24
- Provides-Extra: crt
25
23
  License-File: LICENSE
26
24
  License-File: NOTICE
25
+ Requires-Dist: botocore<1.36.0,>=1.35.26
26
+ Requires-Dist: jmespath<2.0.0,>=0.7.1
27
+ Requires-Dist: s3transfer<0.11.0,>=0.10.0
28
+ Provides-Extra: crt
29
+ Requires-Dist: botocore[crt]<2.0a0,>=1.21.0; extra == "crt"
27
30
 
28
31
  ===============================
29
32
  Boto3 - The AWS SDK for Python
@@ -175,5 +178,3 @@ More Resources
175
178
  * `NOTICE <https://github.com/boto/boto3/blob/develop/NOTICE>`__
176
179
  * `Changelog <https://github.com/boto/boto3/blob/develop/CHANGELOG.rst>`__
177
180
  * `License <https://github.com/boto/boto3/blob/develop/LICENSE>`__
178
-
179
-
@@ -17,7 +17,7 @@ from boto3.compat import _warn_deprecated_python
17
17
  from boto3.session import Session
18
18
 
19
19
  __author__ = 'Amazon Web Services'
20
- __version__ = '1.35.24'
20
+ __version__ = '1.35.26'
21
21
 
22
22
 
23
23
  # The default Boto3 session; autoloaded when needed.
@@ -0,0 +1,35 @@
1
+ Generate a signed URL for Amazon CloudFront
2
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
+
4
+ The following example shows how to generate a signed URL for Amazon CloudFront.
5
+ Note that you will need the ``cryptography`` `library <https://cryptography.io/en/latest/>`__ to follow this example::
6
+
7
+ import datetime
8
+
9
+ from cryptography.hazmat.backends import default_backend
10
+ from cryptography.hazmat.primitives import hashes
11
+ from cryptography.hazmat.primitives import serialization
12
+ from cryptography.hazmat.primitives.asymmetric import padding
13
+ from botocore.signers import CloudFrontSigner
14
+
15
+
16
+ def rsa_signer(message):
17
+ with open('path/to/key.pem', 'rb') as key_file:
18
+ private_key = serialization.load_pem_private_key(
19
+ key_file.read(),
20
+ password=None,
21
+ backend=default_backend()
22
+ )
23
+ return private_key.sign(message, padding.PKCS1v15(), hashes.SHA1())
24
+
25
+ key_id = 'AKIAIOSFODNN7EXAMPLE'
26
+ url = 'http://d2949o5mkkp72v.cloudfront.net/hello.txt'
27
+ expire_date = datetime.datetime(2017, 1, 1)
28
+
29
+ cloudfront_signer = CloudFrontSigner(key_id, rsa_signer)
30
+
31
+ # Create a signed url that will be valid until the specific expiry date
32
+ # provided using a canned policy.
33
+ signed_url = cloudfront_signer.generate_presigned_url(
34
+ url, date_less_than=expire_date)
35
+ print(signed_url)
@@ -0,0 +1,185 @@
1
+ List objects in an Amazon S3 bucket
2
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3
+
4
+ The following example shows how to use an Amazon S3 bucket resource to list
5
+ the objects in the bucket.
6
+
7
+ .. code-block:: python
8
+
9
+ import boto3
10
+
11
+ s3 = boto3.resource('s3')
12
+ bucket = s3.Bucket('my-bucket')
13
+ for obj in bucket.objects.all():
14
+ print(obj.key)
15
+
16
+
17
+ List top-level common prefixes in Amazon S3 bucket
18
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
19
+
20
+ This example shows how to list all of the top-level common prefixes in an
21
+ Amazon S3 bucket:
22
+
23
+ .. code-block:: python
24
+
25
+ import boto3
26
+
27
+ client = boto3.client('s3')
28
+ paginator = client.get_paginator('list_objects')
29
+ result = paginator.paginate(Bucket='my-bucket', Delimiter='/')
30
+ for prefix in result.search('CommonPrefixes'):
31
+ print(prefix.get('Prefix'))
32
+
33
+
34
+ Restore Glacier objects in an Amazon S3 bucket
35
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36
+
37
+ The following example shows how to initiate restoration of glacier objects in
38
+ an Amazon S3 bucket, determine if a restoration is on-going, and determine if a
39
+ restoration is finished.
40
+
41
+ .. code-block:: python
42
+
43
+ import boto3
44
+
45
+ s3 = boto3.resource('s3')
46
+ bucket = s3.Bucket('glacier-bucket')
47
+ for obj_sum in bucket.objects.all():
48
+ obj = s3.Object(obj_sum.bucket_name, obj_sum.key)
49
+ if obj.storage_class == 'GLACIER':
50
+ # Try to restore the object if the storage class is glacier and
51
+ # the object does not have a completed or ongoing restoration
52
+ # request.
53
+ if obj.restore is None:
54
+ print('Submitting restoration request: %s' % obj.key)
55
+ obj.restore_object(RestoreRequest={'Days': 1})
56
+ # Print out objects whose restoration is on-going
57
+ elif 'ongoing-request="true"' in obj.restore:
58
+ print('Restoration in-progress: %s' % obj.key)
59
+ # Print out objects whose restoration is complete
60
+ elif 'ongoing-request="false"' in obj.restore:
61
+ print('Restoration complete: %s' % obj.key)
62
+
63
+
64
+ Uploading/downloading files using SSE KMS
65
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66
+
67
+ This example shows how to use SSE-KMS to upload objects using
68
+ server side encryption with a key managed by KMS.
69
+
70
+ We can either use the default KMS master key, or create a
71
+ custom key in AWS and use it to encrypt the object by passing in its
72
+ key id.
73
+
74
+ With KMS, nothing else needs to be provided for getting the
75
+ object; S3 already knows how to decrypt the object.
76
+
77
+
78
+ .. code-block:: python
79
+
80
+ import boto3
81
+ import os
82
+
83
+ BUCKET = 'your-bucket-name'
84
+ s3 = boto3.client('s3')
85
+ keyid = '<the key id>'
86
+
87
+ print("Uploading S3 object with SSE-KMS")
88
+ s3.put_object(Bucket=BUCKET,
89
+ Key='encrypt-key',
90
+ Body=b'foobar',
91
+ ServerSideEncryption='aws:kms',
92
+ # Optional: SSEKMSKeyId
93
+ SSEKMSKeyId=keyid)
94
+ print("Done")
95
+
96
+ # Getting the object:
97
+ print("Getting S3 object...")
98
+ response = s3.get_object(Bucket=BUCKET,
99
+ Key='encrypt-key')
100
+ print("Done, response body:")
101
+ print(response['Body'].read())
102
+
103
+
104
+ Uploading/downloading files using SSE Customer Keys
105
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106
+
107
+ This example shows how to use SSE-C to upload objects using
108
+ server side encryption with a customer provided key.
109
+
110
+ First, we'll need a 32 byte key. For this example, we'll
111
+ randomly generate a key but you can use any 32 byte key
112
+ you want. Remember, you must the same key to download
113
+ the object. If you lose the encryption key, you lose
114
+ the object.
115
+
116
+ Also note how we don't have to provide the SSECustomerKeyMD5.
117
+ Boto3 will automatically compute this value for us.
118
+
119
+
120
+ .. code-block:: python
121
+
122
+ import boto3
123
+ import os
124
+
125
+ BUCKET = 'your-bucket-name'
126
+ KEY = os.urandom(32)
127
+ s3 = boto3.client('s3')
128
+
129
+ print("Uploading S3 object with SSE-C")
130
+ s3.put_object(Bucket=BUCKET,
131
+ Key='encrypt-key',
132
+ Body=b'foobar',
133
+ SSECustomerKey=KEY,
134
+ SSECustomerAlgorithm='AES256')
135
+ print("Done")
136
+
137
+ # Getting the object:
138
+ print("Getting S3 object...")
139
+ # Note how we're using the same ``KEY`` we
140
+ # created earlier.
141
+ response = s3.get_object(Bucket=BUCKET,
142
+ Key='encrypt-key',
143
+ SSECustomerKey=KEY,
144
+ SSECustomerAlgorithm='AES256')
145
+ print("Done, response body:")
146
+ print(response['Body'].read())
147
+
148
+
149
+ Downloading a specific version of an S3 object
150
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
151
+
152
+ This example shows how to download a specific version of an
153
+ S3 object.
154
+
155
+ .. code-block:: python
156
+
157
+ import boto3
158
+ s3 = boto3.client('s3')
159
+
160
+ s3.download_file(
161
+ "bucket-name", "key-name", "tmp.txt",
162
+ ExtraArgs={"VersionId": "my-version-id"}
163
+ )
164
+
165
+
166
+ Filter objects by last modified time using JMESPath
167
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
168
+
169
+ This example shows how to filter objects by last modified time
170
+ using JMESPath.
171
+
172
+ .. code-block:: python
173
+
174
+ import boto3
175
+ s3 = boto3.client("s3")
176
+
177
+ s3_paginator = s3.get_paginator('list_objects_v2')
178
+ s3_iterator = s3_paginator.paginate(Bucket='your-bucket-name')
179
+
180
+ filtered_iterator = s3_iterator.search(
181
+ "Contents[?to_string(LastModified)>='\"2022-01-05 08:05:37+00:00\"'].Key"
182
+ )
183
+
184
+ for key_data in filtered_iterator:
185
+ print(key_data)
@@ -1,13 +1,12 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: boto3
3
- Version: 1.35.24
3
+ Version: 1.35.26
4
4
  Summary: The AWS SDK for Python
5
5
  Home-page: https://github.com/boto/boto3
6
6
  Author: Amazon Web Services
7
7
  License: Apache License 2.0
8
8
  Project-URL: Documentation, https://boto3.amazonaws.com/v1/documentation/api/latest/index.html
9
9
  Project-URL: Source, https://github.com/boto/boto3
10
- Platform: UNKNOWN
11
10
  Classifier: Development Status :: 5 - Production/Stable
12
11
  Classifier: Intended Audience :: Developers
13
12
  Classifier: Natural Language :: English
@@ -21,9 +20,13 @@ Classifier: Programming Language :: Python :: 3.10
21
20
  Classifier: Programming Language :: Python :: 3.11
22
21
  Classifier: Programming Language :: Python :: 3.12
23
22
  Requires-Python: >= 3.8
24
- Provides-Extra: crt
25
23
  License-File: LICENSE
26
24
  License-File: NOTICE
25
+ Requires-Dist: botocore<1.36.0,>=1.35.26
26
+ Requires-Dist: jmespath<2.0.0,>=0.7.1
27
+ Requires-Dist: s3transfer<0.11.0,>=0.10.0
28
+ Provides-Extra: crt
29
+ Requires-Dist: botocore[crt]<2.0a0,>=1.21.0; extra == "crt"
27
30
 
28
31
  ===============================
29
32
  Boto3 - The AWS SDK for Python
@@ -175,5 +178,3 @@ More Resources
175
178
  * `NOTICE <https://github.com/boto/boto3/blob/develop/NOTICE>`__
176
179
  * `Changelog <https://github.com/boto/boto3/blob/develop/CHANGELOG.rst>`__
177
180
  * `License <https://github.com/boto/boto3/blob/develop/LICENSE>`__
178
-
179
-
@@ -55,6 +55,8 @@ boto3/dynamodb/types.py
55
55
  boto3/ec2/__init__.py
56
56
  boto3/ec2/createtags.py
57
57
  boto3/ec2/deletetags.py
58
+ boto3/examples/cloudfront.rst
59
+ boto3/examples/s3.rst
58
60
  boto3/resources/__init__.py
59
61
  boto3/resources/action.py
60
62
  boto3/resources/base.py
@@ -1,4 +1,4 @@
1
- botocore<1.36.0,>=1.35.24
1
+ botocore<1.36.0,>=1.35.26
2
2
  jmespath<2.0.0,>=0.7.1
3
3
  s3transfer<0.11.0,>=0.10.0
4
4
 
@@ -3,7 +3,7 @@ universal = 0
3
3
 
4
4
  [metadata]
5
5
  requires_dist =
6
- botocore>=1.35.24,<1.36.0
6
+ botocore>=1.35.26,<1.36.0
7
7
  jmespath>=0.7.1,<2.0.0
8
8
  s3transfer>=0.10.0,<0.11.0
9
9
 
@@ -14,7 +14,7 @@ VERSION_RE = re.compile(r'''__version__ = ['"]([0-9.]+)['"]''')
14
14
 
15
15
 
16
16
  requires = [
17
- 'botocore>=1.35.24,<1.36.0',
17
+ 'botocore>=1.35.26,<1.36.0',
18
18
  'jmespath>=0.7.1,<2.0.0',
19
19
  's3transfer>=0.10.0,<0.11.0',
20
20
  ]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes