mypy-boto3-dynamodb 1.35.60__tar.gz → 1.35.93__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.
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/LICENSE +1 -1
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/PKG-INFO +79 -26
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/README.md +75 -22
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/__init__.pyi → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/__init__.py +10 -1
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/__init__.py → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/__init__.pyi +7 -3
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/__main__.py +11 -8
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/client.py +176 -181
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/client.pyi +176 -180
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/literals.pyi → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/literals.py +21 -1
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/literals.py → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/literals.pyi +19 -3
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/paginator.pyi → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/paginator.py +80 -43
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/paginator.py → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/paginator.pyi +61 -53
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/service_resource.py +100 -102
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/service_resource.pyi +100 -102
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/type_defs.py +70 -67
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/type_defs.pyi +66 -61
- mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/version.py +7 -0
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/waiter.pyi → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/waiter.py +21 -11
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/waiter.py → mypy_boto3_dynamodb-1.35.93/mypy_boto3_dynamodb/waiter.pyi +16 -16
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/PKG-INFO +79 -26
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/requires.txt +1 -1
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/setup.py +6 -6
- mypy_boto3_dynamodb-1.35.60/mypy_boto3_dynamodb/version.py +0 -5
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb/py.typed +0 -0
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/SOURCES.txt +0 -0
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/dependency_links.txt +0 -0
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/not-zip-safe +0 -0
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/mypy_boto3_dynamodb.egg-info/top_level.txt +0 -0
- {mypy_boto3_dynamodb-1.35.60 → mypy_boto3_dynamodb-1.35.93}/setup.cfg +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: mypy-boto3-dynamodb
|
|
3
|
-
Version: 1.35.
|
|
4
|
-
Summary: Type annotations for boto3
|
|
3
|
+
Version: 1.35.93
|
|
4
|
+
Summary: Type annotations for boto3 DynamoDB 1.35.93 service generated with mypy-boto3-builder 8.8.0
|
|
5
5
|
Home-page: https://github.com/youtype/mypy_boto3_builder
|
|
6
6
|
Author: Vlad Emelianov
|
|
7
7
|
Author-email: vlad.emelianov.nz@gmail.com
|
|
@@ -9,7 +9,7 @@ License: MIT License
|
|
|
9
9
|
Project-URL: Documentation, https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/
|
|
10
10
|
Project-URL: Source, https://github.com/youtype/mypy_boto3_builder
|
|
11
11
|
Project-URL: Tracker, https://github.com/youtype/mypy_boto3_builder/issues
|
|
12
|
-
Keywords: boto3 dynamodb type-annotations
|
|
12
|
+
Keywords: boto3 dynamodb boto3-stubs type-annotations mypy typeshed autocomplete
|
|
13
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
14
|
Classifier: Intended Audience :: Developers
|
|
15
15
|
Classifier: Environment :: Console
|
|
@@ -30,41 +30,41 @@ Classifier: Typing :: Stubs Only
|
|
|
30
30
|
Requires-Python: >=3.8
|
|
31
31
|
Description-Content-Type: text/markdown
|
|
32
32
|
License-File: LICENSE
|
|
33
|
-
Requires-Dist: typing-extensions
|
|
33
|
+
Requires-Dist: typing-extensions; python_version < "3.12"
|
|
34
34
|
|
|
35
35
|
<a id="mypy-boto3-dynamodb"></a>
|
|
36
36
|
|
|
37
37
|
# mypy-boto3-dynamodb
|
|
38
38
|
|
|
39
|
-
[](https://pypi.org/project/mypy-boto3-dynamodb)
|
|
40
|
-
[](https://pypi.org/project/mypy-boto3-dynamodb)
|
|
41
|
-
[](https://youtype.github.io/boto3_stubs_docs/
|
|
42
|
-
[](https://
|
|
39
|
+
[](https://pypi.org/project/mypy-boto3-dynamodb/)
|
|
40
|
+
[](https://pypi.org/project/mypy-boto3-dynamodb/)
|
|
41
|
+
[](https://youtype.github.io/boto3_stubs_docs/)
|
|
42
|
+
[](https://pypistats.org/packages/mypy-boto3-dynamodb)
|
|
43
43
|
|
|
44
44
|

|
|
45
45
|
|
|
46
|
-
Type annotations for
|
|
47
|
-
[
|
|
48
|
-
service compatible with [VSCode](https://code.visualstudio.com/),
|
|
46
|
+
Type annotations for [boto3 DynamoDB 1.35.93](https://pypi.org/project/boto3/)
|
|
47
|
+
compatible with [VSCode](https://code.visualstudio.com/),
|
|
49
48
|
[PyCharm](https://www.jetbrains.com/pycharm/),
|
|
50
49
|
[Emacs](https://www.gnu.org/software/emacs/),
|
|
51
50
|
[Sublime Text](https://www.sublimetext.com/),
|
|
52
51
|
[mypy](https://github.com/python/mypy),
|
|
53
52
|
[pyright](https://github.com/microsoft/pyright) and other tools.
|
|
54
53
|
|
|
55
|
-
Generated
|
|
56
|
-
[mypy-boto3-builder 8.
|
|
54
|
+
Generated with
|
|
55
|
+
[mypy-boto3-builder 8.8.0](https://github.com/youtype/mypy_boto3_builder).
|
|
57
56
|
|
|
58
57
|
More information can be found on
|
|
59
58
|
[boto3-stubs](https://pypi.org/project/boto3-stubs/) page and in
|
|
60
59
|
[mypy-boto3-dynamodb docs](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/).
|
|
61
60
|
|
|
62
|
-
See how it helps
|
|
61
|
+
See how it helps you find and fix potential bugs:
|
|
63
62
|
|
|
64
|
-

|
|
65
64
|
|
|
66
65
|
- [mypy-boto3-dynamodb](#mypy-boto3-dynamodb)
|
|
67
66
|
- [How to install](#how-to-install)
|
|
67
|
+
- [Generate locally (recommended)](<#generate-locally-(recommended)>)
|
|
68
68
|
- [VSCode extension](#vscode-extension)
|
|
69
69
|
- [From PyPI with pip](#from-pypi-with-pip)
|
|
70
70
|
- [From conda-forge](#from-conda-forge)
|
|
@@ -77,6 +77,7 @@ See how it helps to find and fix potential bugs:
|
|
|
77
77
|
- [Other IDEs](#other-ides)
|
|
78
78
|
- [mypy](#mypy)
|
|
79
79
|
- [pyright](#pyright)
|
|
80
|
+
- [Pylint compatibility](#pylint-compatibility)
|
|
80
81
|
- [Explicit type annotations](#explicit-type-annotations)
|
|
81
82
|
- [Client annotations](#client-annotations)
|
|
82
83
|
- [Paginators annotations](#paginators-annotations)
|
|
@@ -99,6 +100,21 @@ See how it helps to find and fix potential bugs:
|
|
|
99
100
|
|
|
100
101
|
## How to install
|
|
101
102
|
|
|
103
|
+
<a id="generate-locally-(recommended)"></a>
|
|
104
|
+
|
|
105
|
+
### Generate locally (recommended)
|
|
106
|
+
|
|
107
|
+
You can generate type annotations for `boto3` package locally with
|
|
108
|
+
`mypy_boto3_builder`. Use
|
|
109
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/) for build
|
|
110
|
+
isolation.
|
|
111
|
+
|
|
112
|
+
1. Run mypy-boto3-builder in your package root directory:
|
|
113
|
+
`uvx --with 'boto3==1.35.93' mypy_boto3_builder`
|
|
114
|
+
2. Select `boto3-stubs` AWS SDK.
|
|
115
|
+
3. Add `DynamoDB` service.
|
|
116
|
+
4. Use provided commands to install generated packages.
|
|
117
|
+
|
|
102
118
|
<a id="vscode-extension"></a>
|
|
103
119
|
|
|
104
120
|
### VSCode extension
|
|
@@ -119,12 +135,10 @@ Install `boto3-stubs` for `DynamoDB` service.
|
|
|
119
135
|
# install with boto3 type annotations
|
|
120
136
|
python -m pip install 'boto3-stubs[dynamodb]'
|
|
121
137
|
|
|
122
|
-
|
|
123
138
|
# Lite version does not provide session.client/resource overloads
|
|
124
139
|
# it is more RAM-friendly, but requires explicit type annotations
|
|
125
140
|
python -m pip install 'boto3-stubs-lite[dynamodb]'
|
|
126
141
|
|
|
127
|
-
|
|
128
142
|
# standalone installation
|
|
129
143
|
python -m pip install mypy-boto3-dynamodb
|
|
130
144
|
```
|
|
@@ -133,8 +147,7 @@ python -m pip install mypy-boto3-dynamodb
|
|
|
133
147
|
|
|
134
148
|
### From conda-forge
|
|
135
149
|
|
|
136
|
-
|
|
137
|
-
by adding `conda-forge` to your channels with:
|
|
150
|
+
Add `conda-forge` to your channels with:
|
|
138
151
|
|
|
139
152
|
```bash
|
|
140
153
|
conda config --add channels conda-forge
|
|
@@ -148,8 +161,8 @@ installed with:
|
|
|
148
161
|
conda install mypy-boto3-dynamodb
|
|
149
162
|
```
|
|
150
163
|
|
|
151
|
-
|
|
152
|
-
|
|
164
|
+
List all available versions of `mypy-boto3-dynamodb` available on your platform
|
|
165
|
+
with:
|
|
153
166
|
|
|
154
167
|
```bash
|
|
155
168
|
conda search mypy-boto3-dynamodb --channel conda-forge
|
|
@@ -189,16 +202,31 @@ annotations required, write your `boto3` code as usual.
|
|
|
189
202
|
|
|
190
203
|
### PyCharm
|
|
191
204
|
|
|
192
|
-
|
|
205
|
+
> ⚠️ Due to slow PyCharm performance on `Literal` overloads (issue
|
|
206
|
+
> [PY-40997](https://youtrack.jetbrains.com/issue/PY-40997)), it is recommended
|
|
207
|
+
> to use [boto3-stubs-lite](https://pypi.org/project/boto3-stubs-lite/) until
|
|
208
|
+
> the issue is resolved.
|
|
209
|
+
|
|
210
|
+
> ⚠️ If you experience slow performance and high CPU usage, try to disable
|
|
211
|
+
> `PyCharm` type checker and use [mypy](https://github.com/python/mypy) or
|
|
212
|
+
> [pyright](https://github.com/microsoft/pyright) instead.
|
|
213
|
+
|
|
214
|
+
> ⚠️ To continue using `PyCharm` type checker, you can try to replace
|
|
215
|
+
> `boto3-stubs` with
|
|
216
|
+
> [boto3-stubs-lite](https://pypi.org/project/boto3-stubs-lite/):
|
|
193
217
|
|
|
194
218
|
```bash
|
|
195
|
-
|
|
219
|
+
pip uninstall boto3-stubs
|
|
220
|
+
pip install boto3-stubs-lite
|
|
196
221
|
```
|
|
197
222
|
|
|
198
|
-
|
|
199
|
-
annotations **are required**.
|
|
223
|
+
Install `boto3-stubs[dynamodb]` in your environment:
|
|
200
224
|
|
|
201
|
-
|
|
225
|
+
```bash
|
|
226
|
+
python -m pip install 'boto3-stubs[dynamodb]'
|
|
227
|
+
```
|
|
228
|
+
|
|
229
|
+
Both type checking and code completion should now work.
|
|
202
230
|
|
|
203
231
|
<a id="emacs"></a>
|
|
204
232
|
|
|
@@ -284,6 +312,31 @@ Optionally, you can install `boto3-stubs` to `typings` directory.
|
|
|
284
312
|
Type checking should now work. No explicit type annotations required, write
|
|
285
313
|
your `boto3` code as usual.
|
|
286
314
|
|
|
315
|
+
<a id="pylint-compatibility"></a>
|
|
316
|
+
|
|
317
|
+
### Pylint compatibility
|
|
318
|
+
|
|
319
|
+
It is totally safe to use `TYPE_CHECKING` flag in order to avoid
|
|
320
|
+
`mypy-boto3-dynamodb` dependency in production. However, there is an issue in
|
|
321
|
+
`pylint` that it complains about undefined variables. To fix it, set all types
|
|
322
|
+
to `object` in non-`TYPE_CHECKING` mode.
|
|
323
|
+
|
|
324
|
+
```python
|
|
325
|
+
from typing import TYPE_CHECKING
|
|
326
|
+
|
|
327
|
+
if TYPE_CHECKING:
|
|
328
|
+
from mypy_boto3_ec2 import EC2Client, EC2ServiceResource
|
|
329
|
+
from mypy_boto3_ec2.waiters import BundleTaskCompleteWaiter
|
|
330
|
+
from mypy_boto3_ec2.paginators import DescribeVolumesPaginator
|
|
331
|
+
else:
|
|
332
|
+
EC2Client = object
|
|
333
|
+
EC2ServiceResource = object
|
|
334
|
+
BundleTaskCompleteWaiter = object
|
|
335
|
+
DescribeVolumesPaginator = object
|
|
336
|
+
|
|
337
|
+
...
|
|
338
|
+
```
|
|
339
|
+
|
|
287
340
|
<a id="explicit-type-annotations"></a>
|
|
288
341
|
|
|
289
342
|
## Explicit type annotations
|
|
@@ -2,35 +2,35 @@
|
|
|
2
2
|
|
|
3
3
|
# mypy-boto3-dynamodb
|
|
4
4
|
|
|
5
|
-
[](https://pypi.org/project/mypy-boto3-dynamodb)
|
|
6
|
-
[](https://pypi.org/project/mypy-boto3-dynamodb)
|
|
7
|
-
[](https://youtype.github.io/boto3_stubs_docs/
|
|
8
|
-
[](https://
|
|
5
|
+
[](https://pypi.org/project/mypy-boto3-dynamodb/)
|
|
6
|
+
[](https://pypi.org/project/mypy-boto3-dynamodb/)
|
|
7
|
+
[](https://youtype.github.io/boto3_stubs_docs/)
|
|
8
|
+
[](https://pypistats.org/packages/mypy-boto3-dynamodb)
|
|
9
9
|
|
|
10
10
|

|
|
11
11
|
|
|
12
|
-
Type annotations for
|
|
13
|
-
[
|
|
14
|
-
service compatible with [VSCode](https://code.visualstudio.com/),
|
|
12
|
+
Type annotations for [boto3 DynamoDB 1.35.93](https://pypi.org/project/boto3/)
|
|
13
|
+
compatible with [VSCode](https://code.visualstudio.com/),
|
|
15
14
|
[PyCharm](https://www.jetbrains.com/pycharm/),
|
|
16
15
|
[Emacs](https://www.gnu.org/software/emacs/),
|
|
17
16
|
[Sublime Text](https://www.sublimetext.com/),
|
|
18
17
|
[mypy](https://github.com/python/mypy),
|
|
19
18
|
[pyright](https://github.com/microsoft/pyright) and other tools.
|
|
20
19
|
|
|
21
|
-
Generated
|
|
22
|
-
[mypy-boto3-builder 8.
|
|
20
|
+
Generated with
|
|
21
|
+
[mypy-boto3-builder 8.8.0](https://github.com/youtype/mypy_boto3_builder).
|
|
23
22
|
|
|
24
23
|
More information can be found on
|
|
25
24
|
[boto3-stubs](https://pypi.org/project/boto3-stubs/) page and in
|
|
26
25
|
[mypy-boto3-dynamodb docs](https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb/).
|
|
27
26
|
|
|
28
|
-
See how it helps
|
|
27
|
+
See how it helps you find and fix potential bugs:
|
|
29
28
|
|
|
30
|
-

|
|
31
30
|
|
|
32
31
|
- [mypy-boto3-dynamodb](#mypy-boto3-dynamodb)
|
|
33
32
|
- [How to install](#how-to-install)
|
|
33
|
+
- [Generate locally (recommended)](<#generate-locally-(recommended)>)
|
|
34
34
|
- [VSCode extension](#vscode-extension)
|
|
35
35
|
- [From PyPI with pip](#from-pypi-with-pip)
|
|
36
36
|
- [From conda-forge](#from-conda-forge)
|
|
@@ -43,6 +43,7 @@ See how it helps to find and fix potential bugs:
|
|
|
43
43
|
- [Other IDEs](#other-ides)
|
|
44
44
|
- [mypy](#mypy)
|
|
45
45
|
- [pyright](#pyright)
|
|
46
|
+
- [Pylint compatibility](#pylint-compatibility)
|
|
46
47
|
- [Explicit type annotations](#explicit-type-annotations)
|
|
47
48
|
- [Client annotations](#client-annotations)
|
|
48
49
|
- [Paginators annotations](#paginators-annotations)
|
|
@@ -65,6 +66,21 @@ See how it helps to find and fix potential bugs:
|
|
|
65
66
|
|
|
66
67
|
## How to install
|
|
67
68
|
|
|
69
|
+
<a id="generate-locally-(recommended)"></a>
|
|
70
|
+
|
|
71
|
+
### Generate locally (recommended)
|
|
72
|
+
|
|
73
|
+
You can generate type annotations for `boto3` package locally with
|
|
74
|
+
`mypy_boto3_builder`. Use
|
|
75
|
+
[uv](https://docs.astral.sh/uv/getting-started/installation/) for build
|
|
76
|
+
isolation.
|
|
77
|
+
|
|
78
|
+
1. Run mypy-boto3-builder in your package root directory:
|
|
79
|
+
`uvx --with 'boto3==1.35.93' mypy_boto3_builder`
|
|
80
|
+
2. Select `boto3-stubs` AWS SDK.
|
|
81
|
+
3. Add `DynamoDB` service.
|
|
82
|
+
4. Use provided commands to install generated packages.
|
|
83
|
+
|
|
68
84
|
<a id="vscode-extension"></a>
|
|
69
85
|
|
|
70
86
|
### VSCode extension
|
|
@@ -85,12 +101,10 @@ Install `boto3-stubs` for `DynamoDB` service.
|
|
|
85
101
|
# install with boto3 type annotations
|
|
86
102
|
python -m pip install 'boto3-stubs[dynamodb]'
|
|
87
103
|
|
|
88
|
-
|
|
89
104
|
# Lite version does not provide session.client/resource overloads
|
|
90
105
|
# it is more RAM-friendly, but requires explicit type annotations
|
|
91
106
|
python -m pip install 'boto3-stubs-lite[dynamodb]'
|
|
92
107
|
|
|
93
|
-
|
|
94
108
|
# standalone installation
|
|
95
109
|
python -m pip install mypy-boto3-dynamodb
|
|
96
110
|
```
|
|
@@ -99,8 +113,7 @@ python -m pip install mypy-boto3-dynamodb
|
|
|
99
113
|
|
|
100
114
|
### From conda-forge
|
|
101
115
|
|
|
102
|
-
|
|
103
|
-
by adding `conda-forge` to your channels with:
|
|
116
|
+
Add `conda-forge` to your channels with:
|
|
104
117
|
|
|
105
118
|
```bash
|
|
106
119
|
conda config --add channels conda-forge
|
|
@@ -114,8 +127,8 @@ installed with:
|
|
|
114
127
|
conda install mypy-boto3-dynamodb
|
|
115
128
|
```
|
|
116
129
|
|
|
117
|
-
|
|
118
|
-
|
|
130
|
+
List all available versions of `mypy-boto3-dynamodb` available on your platform
|
|
131
|
+
with:
|
|
119
132
|
|
|
120
133
|
```bash
|
|
121
134
|
conda search mypy-boto3-dynamodb --channel conda-forge
|
|
@@ -155,16 +168,31 @@ annotations required, write your `boto3` code as usual.
|
|
|
155
168
|
|
|
156
169
|
### PyCharm
|
|
157
170
|
|
|
158
|
-
|
|
171
|
+
> ⚠️ Due to slow PyCharm performance on `Literal` overloads (issue
|
|
172
|
+
> [PY-40997](https://youtrack.jetbrains.com/issue/PY-40997)), it is recommended
|
|
173
|
+
> to use [boto3-stubs-lite](https://pypi.org/project/boto3-stubs-lite/) until
|
|
174
|
+
> the issue is resolved.
|
|
175
|
+
|
|
176
|
+
> ⚠️ If you experience slow performance and high CPU usage, try to disable
|
|
177
|
+
> `PyCharm` type checker and use [mypy](https://github.com/python/mypy) or
|
|
178
|
+
> [pyright](https://github.com/microsoft/pyright) instead.
|
|
179
|
+
|
|
180
|
+
> ⚠️ To continue using `PyCharm` type checker, you can try to replace
|
|
181
|
+
> `boto3-stubs` with
|
|
182
|
+
> [boto3-stubs-lite](https://pypi.org/project/boto3-stubs-lite/):
|
|
159
183
|
|
|
160
184
|
```bash
|
|
161
|
-
|
|
185
|
+
pip uninstall boto3-stubs
|
|
186
|
+
pip install boto3-stubs-lite
|
|
162
187
|
```
|
|
163
188
|
|
|
164
|
-
|
|
165
|
-
annotations **are required**.
|
|
189
|
+
Install `boto3-stubs[dynamodb]` in your environment:
|
|
166
190
|
|
|
167
|
-
|
|
191
|
+
```bash
|
|
192
|
+
python -m pip install 'boto3-stubs[dynamodb]'
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
Both type checking and code completion should now work.
|
|
168
196
|
|
|
169
197
|
<a id="emacs"></a>
|
|
170
198
|
|
|
@@ -250,6 +278,31 @@ Optionally, you can install `boto3-stubs` to `typings` directory.
|
|
|
250
278
|
Type checking should now work. No explicit type annotations required, write
|
|
251
279
|
your `boto3` code as usual.
|
|
252
280
|
|
|
281
|
+
<a id="pylint-compatibility"></a>
|
|
282
|
+
|
|
283
|
+
### Pylint compatibility
|
|
284
|
+
|
|
285
|
+
It is totally safe to use `TYPE_CHECKING` flag in order to avoid
|
|
286
|
+
`mypy-boto3-dynamodb` dependency in production. However, there is an issue in
|
|
287
|
+
`pylint` that it complains about undefined variables. To fix it, set all types
|
|
288
|
+
to `object` in non-`TYPE_CHECKING` mode.
|
|
289
|
+
|
|
290
|
+
```python
|
|
291
|
+
from typing import TYPE_CHECKING
|
|
292
|
+
|
|
293
|
+
if TYPE_CHECKING:
|
|
294
|
+
from mypy_boto3_ec2 import EC2Client, EC2ServiceResource
|
|
295
|
+
from mypy_boto3_ec2.waiters import BundleTaskCompleteWaiter
|
|
296
|
+
from mypy_boto3_ec2.paginators import DescribeVolumesPaginator
|
|
297
|
+
else:
|
|
298
|
+
EC2Client = object
|
|
299
|
+
EC2ServiceResource = object
|
|
300
|
+
BundleTaskCompleteWaiter = object
|
|
301
|
+
DescribeVolumesPaginator = object
|
|
302
|
+
|
|
303
|
+
...
|
|
304
|
+
```
|
|
305
|
+
|
|
253
306
|
<a id="explicit-type-annotations"></a>
|
|
254
307
|
|
|
255
308
|
## Explicit type annotations
|
|
@@ -33,6 +33,8 @@ Usage::
|
|
|
33
33
|
query_paginator: QueryPaginator = client.get_paginator("query")
|
|
34
34
|
scan_paginator: ScanPaginator = client.get_paginator("scan")
|
|
35
35
|
```
|
|
36
|
+
|
|
37
|
+
Copyright 2025 Vlad Emelianov
|
|
36
38
|
"""
|
|
37
39
|
|
|
38
40
|
from .client import DynamoDBClient
|
|
@@ -43,13 +45,20 @@ from .paginator import (
|
|
|
43
45
|
QueryPaginator,
|
|
44
46
|
ScanPaginator,
|
|
45
47
|
)
|
|
46
|
-
from .service_resource import DynamoDBServiceResource
|
|
47
48
|
from .waiter import TableExistsWaiter, TableNotExistsWaiter
|
|
48
49
|
|
|
50
|
+
try:
|
|
51
|
+
from .service_resource import DynamoDBServiceResource
|
|
52
|
+
except ImportError:
|
|
53
|
+
from builtins import object as DynamoDBServiceResource # type: ignore[assignment]
|
|
54
|
+
|
|
55
|
+
|
|
49
56
|
Client = DynamoDBClient
|
|
50
57
|
|
|
58
|
+
|
|
51
59
|
ServiceResource = DynamoDBServiceResource
|
|
52
60
|
|
|
61
|
+
|
|
53
62
|
__all__ = (
|
|
54
63
|
"Client",
|
|
55
64
|
"DynamoDBClient",
|
|
@@ -33,6 +33,8 @@ Usage::
|
|
|
33
33
|
query_paginator: QueryPaginator = client.get_paginator("query")
|
|
34
34
|
scan_paginator: ScanPaginator = client.get_paginator("scan")
|
|
35
35
|
```
|
|
36
|
+
|
|
37
|
+
Copyright 2025 Vlad Emelianov
|
|
36
38
|
"""
|
|
37
39
|
|
|
38
40
|
from .client import DynamoDBClient
|
|
@@ -43,15 +45,17 @@ from .paginator import (
|
|
|
43
45
|
QueryPaginator,
|
|
44
46
|
ScanPaginator,
|
|
45
47
|
)
|
|
46
|
-
from .service_resource import DynamoDBServiceResource
|
|
47
48
|
from .waiter import TableExistsWaiter, TableNotExistsWaiter
|
|
48
49
|
|
|
49
|
-
|
|
50
|
+
try:
|
|
51
|
+
from .service_resource import DynamoDBServiceResource
|
|
52
|
+
except ImportError:
|
|
53
|
+
from builtins import object as DynamoDBServiceResource # type: ignore[assignment]
|
|
50
54
|
|
|
55
|
+
Client = DynamoDBClient
|
|
51
56
|
|
|
52
57
|
ServiceResource = DynamoDBServiceResource
|
|
53
58
|
|
|
54
|
-
|
|
55
59
|
__all__ = (
|
|
56
60
|
"Client",
|
|
57
61
|
"DynamoDBClient",
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
"""
|
|
2
2
|
Main CLI entrypoint.
|
|
3
|
+
|
|
4
|
+
Copyright 2025 Vlad Emelianov
|
|
3
5
|
"""
|
|
4
6
|
|
|
5
7
|
import sys
|
|
@@ -9,14 +11,14 @@ def print_info() -> None:
|
|
|
9
11
|
"""
|
|
10
12
|
Print package info to stdout.
|
|
11
13
|
"""
|
|
12
|
-
|
|
13
|
-
"Type annotations for boto3
|
|
14
|
-
"Version: 1.35.
|
|
15
|
-
"Builder version: 8.
|
|
14
|
+
sys.stdout.write(
|
|
15
|
+
"Type annotations for boto3 DynamoDB 1.35.93\n"
|
|
16
|
+
"Version: 1.35.93\n"
|
|
17
|
+
"Builder version: 8.8.0\n"
|
|
16
18
|
"Docs: https://youtype.github.io/boto3_stubs_docs/mypy_boto3_dynamodb//\n"
|
|
17
|
-
"Boto3 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#
|
|
19
|
+
"Boto3 docs: https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/dynamodb.html#dynamodb\n"
|
|
18
20
|
"Other services: https://pypi.org/project/boto3-stubs/\n"
|
|
19
|
-
"Changelog: https://github.com/youtype/mypy_boto3_builder/releases"
|
|
21
|
+
"Changelog: https://github.com/youtype/mypy_boto3_builder/releases\n"
|
|
20
22
|
)
|
|
21
23
|
|
|
22
24
|
|
|
@@ -24,7 +26,7 @@ def print_version() -> None:
|
|
|
24
26
|
"""
|
|
25
27
|
Print package version to stdout.
|
|
26
28
|
"""
|
|
27
|
-
|
|
29
|
+
sys.stdout.write("1.35.93\n")
|
|
28
30
|
|
|
29
31
|
|
|
30
32
|
def main() -> None:
|
|
@@ -32,7 +34,8 @@ def main() -> None:
|
|
|
32
34
|
Main CLI entrypoint.
|
|
33
35
|
"""
|
|
34
36
|
if "--version" in sys.argv:
|
|
35
|
-
|
|
37
|
+
print_version()
|
|
38
|
+
return
|
|
36
39
|
print_info()
|
|
37
40
|
|
|
38
41
|
|