{"id":28331,"library":"tencentcloud-sdk-python-domain","title":"Tencent Cloud Domain SDK for Python","description":"Official Tencent Cloud SDK for managing Domain services (e.g., domain registration, DNS management). Version 3.1.65. Release cadence is irregular, often bundled with other tencentcloud-sdk-python packages.","status":"active","version":"3.1.65","language":"python","source_language":"en","source_url":"https://github.com/TencentCloud/tencentcloud-sdk-python","tags":["tencentcloud","domain","sdk","cloud"],"install":[{"cmd":"pip install tencentcloud-sdk-python-domain","lang":"bash","label":"Install via pip"}],"dependencies":[{"reason":"Core SDK base classes and credential handling.","package":"tencentcloud-sdk-python-common","optional":false}],"imports":[{"note":"The API version (v20180808) must be explicitly imported, not just the top-level package.","wrong":"from tencentcloud.domain import DomainClient","symbol":"DomainClient","correct":"from tencentcloud.domain.v20180808 import domain_client"},{"note":"Same as above: models are version-specific.","wrong":"from tencentcloud.domain import models","symbol":"models","correct":"from tencentcloud.domain.v20180808 import models"}],"quickstart":{"code":"import os\nfrom tencentcloud.common import credential\nfrom tencentcloud.domain.v20180808 import domain_client, models\n\ncred = credential.Credential(\n    os.environ.get('TENCENTCLOUD_SECRET_ID', ''),\n    os.environ.get('TENCENTCLOUD_SECRET_KEY', '')\n)\nclient = domain_client.DomainClient(cred, \"ap-guangzhou\")\nreq = models.DescribeDomainNameListRequest()\nresp = client.DescribeDomainNameList(req)\nprint(resp)","lang":"python","description":"Initialize client and list domain names. Requires valid credentials in environment variables."},"warnings":[{"fix":"Use `from tencentcloud.domain.v20180808 import domain_client` instead of `from tencentcloud.domain.v20180808.domain_client import DomainClient`.","message":"In version 3.x, the import paths changed from `tencentcloud.domain.v20180808` (no 'domain' after 'tencentcloud'). Older versions used `tencentcloud.domain.v20180808.domain_client`. The module name is now `domain_client` but it is inside the version package.","severity":"breaking","affected_versions":">=3.0.0"},{"fix":"Always check the official API documentation for the correct version string (currently v20180808).","message":"The API version ('v20180808') must match the service version. Using an incorrect version will cause import errors or unexpected behavior.","severity":"gotcha","affected_versions":"all"},{"fix":"Install `tencentcloud-sdk-python-common` or use `tencentcloud-sdk-python` (meta-package) to include all services.","message":"This package only contains the Domain service. It requires `tencentcloud-sdk-python-common` to be installed separately.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Install the correct package: `pip install tencentcloud-sdk-python-domain`","cause":"The wrong package installed; users often install only `tencentcloud-sdk-python` (meta) or forget the domain-specific package.","error":"ModuleNotFoundError: No module named 'tencentcloud.domain'"},{"fix":"Use `from tencentcloud.domain.v20180808 import domain_client`","cause":"Importing the version module directly instead of importing the domain_client submodule.","error":"AttributeError: module 'tencentcloud.domain.v20180808' has no attribute 'domain_client'"},{"fix":"Refer to the official API documentation for the correct request structure, and set all required fields via the model object.","cause":"Missing or incorrect request parameters (e.g., required fields not set).","error":"tencentcloud.common.exception.TencentCloudSDKException: InvalidParameter"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}