{"library":"smartystreets-python-sdk","title":"SmartyStreets Python SDK","type":"library","description":"The SmartyStreets Python SDK is an official library designed to simplify access to SmartyStreets APIs for Python developers. It provides ready-made data structures and handles the underlying HTTP complexities. The library is currently at version 5.7.0, released on April 1, 2026, and is actively maintained with regular updates.","language":"python","status":"active","last_verified":"Sun May 17","install":{"commands":["pip install smartystreets-python-sdk"],"cli":null},"imports":["from smartystreets_python_sdk import BasicAuthCredentials","from smartystreets_python_sdk import ClientBuilder","from smartystreets_python_sdk import exceptions","from smartystreets_python_sdk.us_street import Lookup","from smartystreets_python_sdk.us_street.match_type import MatchType"],"auth":{"required":false,"env_vars":[]},"links":{"homepage":"https://www.smarty.com","github":"https://github.com/smartystreets/smartystreets-python-sdk","docs":null,"changelog":null,"pypi":"https://pypi.org/project/smartystreets-python-sdk/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null},"quickstart":{"code":"import os\nfrom smartystreets_python_sdk import BasicAuthCredentials, ClientBuilder, exceptions\nfrom smartystreets_python_sdk.us_street import Lookup\n\n# It is recommended to store your SmartyStreets Auth ID and Auth Token in environment variables.\n# Example: export SMARTY_AUTH_ID='YOUR_AUTH_ID'\n# Example: export SMARTY_AUTH_TOKEN='YOUR_AUTH_TOKEN'\nauth_id = os.environ.get('SMARTY_AUTH_ID', '')\nauth_token = os.environ.get('SMARTY_AUTH_TOKEN', '')\n\nif not auth_id or not auth_token:\n    print('Please set SMARTY_AUTH_ID and SMARTY_AUTH_TOKEN environment variables.')\n    exit(1)\n\ntry:\n    credentials = BasicAuthCredentials(auth_id, auth_token)\n    # The ClientBuilder can be used to build clients for various SmartyStreets APIs.\n    # For US Street Address API, use build_us_street_api_client().\n    client = ClientBuilder(credentials).build_us_street_api_client()\n\n    # Create a Lookup object for the address you want to validate.\n    lookup = Lookup()\n    lookup.street = \"1600 Amphitheatre Pkwy\"\n    lookup.city = \"Mountain View\"\n    lookup.state = \"CA\"\n    lookup.zipcode = \"94043\"\n\n    # Send the lookup to the SmartyStreets API.\n    client.send_lookup(lookup)\n\n    if not lookup.result or not lookup.result.candidates:\n        print(\"No candidates found for the address. It might be invalid.\")\n    else:\n        first_candidate = lookup.result.candidates[0]\n        print(f\"Validated Address: {first_candidate.delivery_line_1}, {first_candidate.last_line}\")\n        print(f\"Components: City={first_candidate.components.city_name}, State={first_candidate.components.state_abbreviation}, ZIP={first_candidate.components.zipcode}\")\n        if first_candidate.metadata.latitude and first_candidate.metadata.longitude:\n            print(f\"Latitude: {first_candidate.metadata.latitude}, Longitude: {first_candidate.metadata.longitude}\")\n\nexcept exceptions.SmartyException as e:\n    print(f\"SmartyStreets API error: {e}\")\nexcept Exception as e:\n    print(f\"An unexpected error occurred: {e}\")","lang":"python","description":"This quickstart demonstrates how to validate a US street address using the SmartyStreets Python SDK. It initializes credentials using environment variables, builds a US Street API client, creates an address lookup, sends it, and prints the validated address details and geocoding information.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":{"tag":null,"tag_description":null,"last_tested":"2026-05-17","installed_version":"6.1.0","pypi_latest":"6.1.0","is_stale":false,"summary":{"python_range":"3.10–3.9","success_rate":100,"avg_install_s":2.2,"avg_import_s":0.64,"wheel_type":"wheel"},"results":[{"runtime":"python:3.10-alpine","python_version":"3.10","os_libc":"alpine (musl)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.6,"mem_mb":10.4,"disk_size":"22.1M"},{"runtime":"python:3.10-slim","python_version":"3.10","os_libc":"slim (glibc)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.45,"mem_mb":10.4,"disk_size":"23M"},{"runtime":"python:3.11-alpine","python_version":"3.11","os_libc":"alpine (musl)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.8,"mem_mb":11.7,"disk_size":"24.2M"},{"runtime":"python:3.11-slim","python_version":"3.11","os_libc":"slim (glibc)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.3,"import_time_s":0.66,"mem_mb":11.7,"disk_size":"25M"},{"runtime":"python:3.12-alpine","python_version":"3.12","os_libc":"alpine (musl)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.72,"mem_mb":12.1,"disk_size":"16.0M"},{"runtime":"python:3.12-slim","python_version":"3.12","os_libc":"slim (glibc)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.71,"mem_mb":12.1,"disk_size":"16M"},{"runtime":"python:3.13-alpine","python_version":"3.13","os_libc":"alpine (musl)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.69,"mem_mb":12.5,"disk_size":"15.8M"},{"runtime":"python:3.13-slim","python_version":"3.13","os_libc":"slim (glibc)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":1.9,"import_time_s":0.7,"mem_mb":12.5,"disk_size":"16M"},{"runtime":"python:3.9-alpine","python_version":"3.9","os_libc":"alpine (musl)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":null,"import_time_s":0.56,"mem_mb":10,"disk_size":"21.3M"},{"runtime":"python:3.9-slim","python_version":"3.9","os_libc":"slim (glibc)","variant":"smartystreets-python-sdk","exit_code":0,"wheel_type":"wheel","failure_reason":null,"import_side_effects":"clean","install_time_s":2.5,"import_time_s":0.52,"mem_mb":10,"disk_size":"22M"}]}}