{"id":3164,"library":"mypy-boto3-vpc-lattice","title":"mypy-boto3-vpc-lattice","description":"mypy-boto3-vpc-lattice provides type annotations for the `boto3` AWS SDK's VPCLattice service, compatible with `mypy`, `pyright`, VSCode, and PyCharm. It's automatically generated by `mypy-boto3-builder` and aims to enhance static type checking for `boto3` users. The project follows a frequent release cadence, often synchronizing with `boto3` updates and `mypy-boto3-builder` enhancements.","status":"active","version":"1.42.3","language":"python","source_language":"en","source_url":"https://github.com/youtype/mypy_boto3_builder","tags":["type-hints","mypy","boto3","aws","vpc-lattice","typings"],"install":[{"cmd":"pip install mypy-boto3-vpc-lattice boto3","lang":"bash","label":"Install specific service stubs and boto3"},{"cmd":"pip install 'boto3-stubs[vpc-lattice]' boto3","lang":"bash","label":"Install via boto3-stubs extra and boto3"}],"dependencies":[{"reason":"This package provides type stubs for boto3; boto3 itself is required at runtime for the type hints to be useful.","package":"boto3","optional":false},{"reason":"A type checker like mypy or pyright is necessary to utilize the provided type annotations.","package":"mypy","optional":true}],"imports":[{"note":"Imports the type-hinted client for AWS VPC Lattice service.","symbol":"VPCLatticeClient","correct":"from mypy_boto3_vpc_lattice.client import VPCLatticeClient"},{"note":"Imports the type-hinted paginator for listing services.","symbol":"ListServicesPaginator","correct":"from mypy_boto3_vpc_lattice.paginator import ListServicesPaginator"},{"note":"Imports a common TypeDef for VPC Lattice service summaries.","symbol":"ServiceSummaryTypeDef","correct":"from mypy_boto3_vpc_lattice.type_defs import ServiceSummaryTypeDef"}],"quickstart":{"code":"import os\nfrom typing import TYPE_CHECKING\nimport boto3\n\n# These imports are only for type checking and won't be evaluated at runtime\nif TYPE_CHECKING:\n    from mypy_boto3_vpc_lattice.client import VPCLatticeClient\n    from mypy_boto3_vpc_lattice.type_defs import ServiceSummaryTypeDef\n\ndef list_vpc_lattice_services() -> list[\"ServiceSummaryTypeDef\"]:\n    # Initialize a boto3 client (runtime object)\n    # The type checker uses the VPCLatticeClient stub for this call\n    client: VPCLatticeClient = boto3.client(\"vpc-lattice\", region_name=os.environ.get('AWS_REGION', 'us-east-1'))\n    \n    print(\"Listing VPC Lattice services...\")\n    response = client.list_services()\n    services = response.get(\"items\", [])\n    \n    for service in services:\n        print(f\"  Service ID: {service.get('id')}, Name: {service.get('name')}\")\n    \n    return services\n\nif __name__ == \"__main__\":\n    # Set a dummy AWS_REGION for local execution if not already set\n    # In a real scenario, credentials/region would be configured via env vars, ~/.aws/config, etc.\n    if 'AWS_REGION' not in os.environ:\n        os.environ['AWS_REGION'] = 'us-east-1'\n\n    try:\n        # This call will actually execute and might require AWS credentials\n        services = list_vpc_lattice_services()\n        print(f\"Found {len(services)} VPC Lattice services.\")\n    except Exception as e:\n        print(f\"An error occurred: {e}. Make sure you have AWS credentials configured.\")\n","lang":"python","description":"This quickstart demonstrates how to use `mypy-boto3-vpc-lattice` for type-hinting a `boto3` VPC Lattice client. The `TYPE_CHECKING` block ensures that the type stub imports are only active during static analysis, avoiding runtime dependencies on the stub package. The `boto3.client` call returns the actual runtime client, which `mypy` (or another type checker) will understand as `VPCLatticeClient` thanks to the installed stubs."},"warnings":[{"fix":"Upgrade to Python 3.9+ or pin `mypy-boto3-vpc-lattice` to a version compatible with Python 3.8.","message":"Support for Python 3.8 was removed in `mypy-boto3-builder` version 8.12.0, affecting all generated `mypy-boto3` packages. Users on Python 3.8 must pin to an older version of `mypy-boto3-vpc-lattice` (prior to versions generated by builder 8.12.0) or upgrade their Python environment.","severity":"breaking","affected_versions":">=8.12.0 of mypy-boto3-builder (affecting mypy-boto3-vpc-lattice versions built with it)"},{"fix":"Review and update explicit TypeDef imports and usage in your code to match the new naming conventions.","message":"In `mypy-boto3-builder` version 8.9.0, there were breaking changes to TypeDef naming conventions. Packed method arguments now use shorter names (e.g., `CreateDistributionRequestRequestTypeDef` -> `CreateDistributionRequestTypeDef`), and conflicting `Extra` postfixes were moved to the end of the name (e.g., `CreateDistributionExtraRequestTypeDef` -> `CreateDistributionRequestExtraTypeDef`). This may require updates to explicit TypeDef annotations in user code.","severity":"breaking","affected_versions":">=8.9.0 of mypy-boto3-builder (affecting mypy-boto3-vpc-lattice versions built with it)"},{"fix":"Ensure `pip install boto3` is executed in your environment alongside `mypy-boto3-vpc-lattice`.","message":"This package provides only type annotations for `boto3`. You must install `boto3` separately for your code to run. This package is solely for static analysis tools like `mypy` or `pyright`.","severity":"gotcha","affected_versions":"All"},{"fix":"Switch to `boto3-stubs-lite` for IDE performance, or use an external type checker.","message":"PyCharm's built-in type checker can experience slow performance or high CPU usage with the full `boto3-stubs` packages due to complex Literal overloads. For better IDE performance, consider using `boto3-stubs-lite` (e.g., `pip install 'boto3-stubs-lite[vpc-lattice]'`) or disabling PyCharm's type checker and relying on external tools like `mypy` or `pyright`.","severity":"gotcha","affected_versions":"All"}],"env_vars":null,"search_vec":"'aim':39 'annot':13 'automat':31 'aw':17,71 'boto3':3,8,16,36,46,58,63,70 'builder':37,64 'cadenc':54 'check':44 'compat':22 'enhanc':41,65 'follow':50 'frequent':52 'generat':32 'hint':68 'lattic':5,10,74 'mypi':2,7,24,35,62,69 'mypy-boto3-builder':34,61 'mypy-boto3-vpc-lattice':1,6 'often':55 'project':49 'provid':11 'pycharm':28 'pyright':25 'releas':53 'sdk':18 'servic':21 'static':42 'synchron':56 'type':12,43,67,75 'type-hint':66 'updat':59 'user':47 'vpc':4,9,73 'vpc-lattic':72 'vpclattic':20 'vscode':26","created_at":"2026-04-11T09:23:46.584622+00:00","updated_at":"2026-04-16T17:16:52.076419+00:00","problems":{"verify_error":"error: Failed to parse: `mypy-boto3-vpc-lattice boto3`\n  Caused by: Expected one of `@`, `(`, `<`, `=`, `>`, `~`, `!`, `;`, found `b`\nmypy-boto3-vpc-lattice boto3\n                       ^"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.43.75","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/youtype/mypy_boto3_builder","docs":"https://youtype.github.io/boto3_stubs_docs/mypy_boto3_vpc_lattice/","changelog":null,"pypi":"https://pypi.org/project/mypy-boto3-vpc-lattice/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["type-stubs","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"passing","verified_at":"2026-06-28","last_verified":"2026-08-28","next_check":"2026-07-05","install_tag":null}}