{"id":3622,"library":"mypy-boto3-managedblockchain-query","title":"mypy-boto3-managedblockchain-query Type Annotations","description":"mypy-boto3-managedblockchain-query provides type annotations for the boto3 ManagedBlockchainQuery service (version 1.42.3), generated using mypy-boto3-builder 8.12.0. This library enhances developer experience by enabling static type checking and IDE autocompletion for AWS ManagedBlockchainQuery client operations. It is actively maintained with releases frequently aligned with boto3 and mypy-boto3-builder updates.","status":"active","version":"1.42.3","language":"en","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["AWS","boto3","mypy","type hints","ManagedBlockchainQuery","stubs","typescript"],"install":[{"cmd":"pip install boto3 mypy-boto3-managedblockchain-query","lang":"bash","label":"Install with pip"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself is required for runtime execution.","package":"boto3","optional":false},{"reason":"Required due to removal of Python 3.8 support in mypy-boto3-builder 8.12.0, affecting all generated packages.","package":"python","optional":false}],"imports":[{"note":"Imports the type for the ManagedBlockchainQuery boto3 client.","symbol":"ManagedBlockchainQueryClient","correct":"from mypy_boto3_managedblockchain_query.client import ManagedBlockchainQueryClient"},{"note":"Imports a specific TypedDict for API response structures.","symbol":"ListTransactionsOutputTypeDef","correct":"from mypy_boto3_managedblockchain_query.type_defs import ListTransactionsOutputTypeDef"},{"note":"Imports a Literal type for the service name, useful for strict type checking of boto3.client calls.","symbol":"ManagedBlockchainQueryServiceName","correct":"from mypy_boto3_managedblockchain_query.literals import ManagedBlockchainQueryServiceName"}],"quickstart":{"code":"import boto3\nfrom mypy_boto3_managedblockchain_query.client import ManagedBlockchainQueryClient\nfrom mypy_boto3_managedblockchain_query.type_defs import ListTransactionsOutputTypeDef\n\n# Ensure AWS credentials (e.g., via ~/.aws/credentials or environment variables)\n# and region are configured for boto3 to function.\n\nclient: ManagedBlockchainQueryClient = boto3.client(\"managedblockchain-query\")\n\ntry:\n    # Example: List transactions for a specific network and address\n    # Replace 'ETHEREUM_MAINNET' and '0x...' with actual values for your use case.\n    # 'fromBlock' and 'toBlock' are placeholders; use appropriate values or remove if not needed.\n    response: ListTransactionsOutputTypeDef = client.list_transactions(\n        network=\"ETHEREUM_MAINNET\",\n        address=\"0x...\", # Placeholder: Replace with a valid blockchain address\n        fromBlock='0',\n        toBlock='latest'\n    )\n\n    print(\"Transactions found:\")\n    for transaction in response.get(\"transactions\", []):\n        print(f\"  Transaction ID: {transaction['transactionId']}\")\n\n    next_token = response.get(\"nextToken\")\n    if next_token:\n        print(f\"  Next Token: {next_token}\")\n\nexcept client.exceptions.ResourceNotFoundException as e:\n    print(f\"Error: Resource not found - {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to initialize a type-hinted ManagedBlockchainQuery client and make a sample API call using the `list_transactions` method. It shows the expected type annotations for the client object and the response structure, enabling better static analysis and autocompletion."},"warnings":[{"fix":"Upgrade your Python environment to 3.9 or later.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated stub packages including `mypy-boto3-managedblockchain-query`. Users on Python 3.8 will need to upgrade to Python 3.9 or newer.","severity":"breaking","affected_versions":">=1.42.0 (generated by builder 8.12.0)"},{"fix":"Ensure the `mypy-boto3-managedblockchain-query` package is installed directly into the Python environment that your `mypy` checker uses. Review `mypy` documentation on PEP 561 stub discovery.","message":"The `mypy-boto3-builder` (from version 8.12.0) migrated all generated packages to PEP 561-compliant stub packages. While generally beneficial, it changes how `mypy` discovers type information. If you were relying on custom `MYPYPATH` configurations for older `mypy-boto3` packages, you might need to adjust your setup as stub-only packages must be installed in the environment `mypy` checks.","severity":"breaking","affected_versions":">=1.42.0 (generated by builder 8.12.0)"},{"fix":"Update your import statements and TypeDef references to use the potentially shorter or re-ordered names. Refer to the specific service's documentation for the correct TypeDef names.","message":"Starting with `mypy-boto3-builder` 8.9.0, TypeDef names for packed method arguments may use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting TypeDef `Extra` postfixes were moved (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). If your code explicitly imported or referenced the older, longer TypeDef names from this package, it might break type checking.","severity":"breaking","affected_versions":">=1.40.0 (generated by builder 8.9.0)"},{"fix":"Always install `boto3` alongside `mypy-boto3-managedblockchain-query`.","message":"This package provides *only* type annotations. You must also install `boto3` (e.g., `pip install boto3`) for your code to function at runtime. Without `boto3` installed, your application will raise `ModuleNotFoundError` or similar runtime errors.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}