Examples#
Index > AgreementService > Examples
Auto-generated documentation for AgreementService type annotations stubs module mypy-boto3-marketplace-agreement.
Client#
Implicit type annotations#
Can be used with boto3-stubs[marketplace-agreement]
package installed.
Write your AgreementService
code as usual,
type checking and code completion should work out of the box.
Client method usage example#
# AgreementServiceClient usage example
from boto3.session import Session
session = Session()
client = session.client("marketplace-agreement") # (1)
result = client.describe_agreement() # (2)
- client: AgreementServiceClient
- result: DescribeAgreementOutputTypeDef
Explicit type annotations#
With boto3-stubs-lite[marketplace-agreement]
or a standalone mypy_boto3_marketplace_agreement
package, you have to explicitly specify client: AgreementServiceClient
type annotation.
All other type annotations are optional, as types should be discovered automatically. However, these type annotations can be helpful in your functions and methods.
Client method usage example#
# AgreementServiceClient usage example with type annotations
from boto3.session import Session
from mypy_boto3_marketplace_agreement.client import AgreementServiceClient
from mypy_boto3_marketplace_agreement.type_defs import DescribeAgreementOutputTypeDef
from mypy_boto3_marketplace_agreement.type_defs import DescribeAgreementInputTypeDef
session = Session()
client: AgreementServiceClient = session.client("marketplace-agreement")
kwargs: DescribeAgreementInputTypeDef = {...}
result: DescribeAgreementOutputTypeDef = client.describe_agreement(**kwargs)