Type annotations for boto3.SavingsPlans 1.14.0 service, generated by mypy-boto3-buider 2.1.0
Project description
mypy-boto3-savingsplans
Type annotations for boto3.SavingsPlans 1.14.0 service compatible with mypy, VSCode, PyCharm and other tools.
Generated by mypy-boto3-buider 2.1.0.
More information can be found on boto3-stubs page.
How to install
Make sure you have mypy installed and activated in your IDE.
Install boto3-stubs
for SavingsPlans
service.
python -m pip install boto3-stubs[savingsplans]
How to use
Client annotations
SavingsPlansClient
provides annotations for boto3.client("savingsplans")
.
import boto3
from mypy_boto3_savingsplans import SavingsPlansClient
client: SavingsPlansClient = boto3.client("savingsplans")
# now client usage is checked by mypy and IDE should provide code auto-complete
# works for session as well
session = boto3.session.Session(region="us-west-1")
session_client: SavingsPlansClient = session.client("savingsplans")
Typed dictionations
mypy_boto3_savingsplans.type_defs
module contains structures and shapes assembled
to typed dictionaries for additional type checking.
from mypy_boto3_savingsplans.type_defs import ParentSavingsPlanOfferingTypeDef, ...
def get_structure() -> ParentSavingsPlanOfferingTypeDef:
return {
...
}
Dynamic type annotations
mypy_boto3
command generates boto3.client/resource
type annotations for
mypy_boto3_savingsplans
and other installed services.
# Run this command after you add or remove service packages
python -m mypy_boto3
Generated type annotations provide overloads for boto3.client
and boto3.resource
,
boto3.Session.client
and boto3.Session.resource
functions,
so explicit type annotations are not needed.
mypy
supports function overloads as expectedPyCharm
also supports function overloads, but consumes a lot of RAM, use carefully if you have many services installedVSCode
does not currently support function overloads, use explicit type annotations
import boto3
# Type is discovered correctly by mypy and PyCharm
# VSCode still needs explicit type annotations
client = boto3.client("savingsplans")
session_client = boto3.Session().client("savingsplans")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mypy-boto3-savingsplans-1.14.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5004758250bf3fa9f62578a0a149e5b1df13750032fa5738bd1dc4cae760dcc |
|
MD5 | 99f38aa63d5cff3541d5d30ad568e8e5 |
|
BLAKE2b-256 | 15021eedd5ad784ea3c4c93498c4adcef69013f07cbba9e0f980fed5dee7d0be |
Hashes for mypy_boto3_savingsplans-1.14.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eaf2333ccf25047adbe4ed4113e99517c2b6a5cedc7847adb80830bb78a236c1 |
|
MD5 | 99f0ba5b77626911de9dd53cc5c99d47 |
|
BLAKE2b-256 | 4f7d5cca42ab3c4808b13dad8875c7f66f07ee148b621f796ac5fc97ad441ba0 |