{"id":26705,"library":"alibabacloud-openplatform20191219","title":"Alibaba Cloud OpenPlatform SDK for Python","description":"The official Alibaba Cloud SDK for OpenPlatform API version 20191219, providing Python bindings to interact with Alibaba Cloud OpenPlatform services such as file upload, authorization, and more. Current version is 2.0.0, requiring Python >=3.6. Released as part of the Alibaba Cloud Python SDK ecosystem.","status":"active","version":"2.0.0","language":"python","source_language":"en","source_url":"https://github.com/aliyun/alibabacloud-python-sdk","tags":["alibaba","cloud","sdk","openplatform","file-upload"],"install":[{"cmd":"pip install alibabacloud-openplatform20191219","lang":"bash","label":"Install from PyPI"}],"dependencies":[{"reason":"Used for authentication (AccessKey, STS, etc.)","package":"alibabacloud_credentials","optional":true},{"reason":"Required for gateway integration","package":"alibabacloud_gateway_spi","optional":true}],"imports":[{"note":"Direct import of Client from the package root fails; must use client submodule.","wrong":"from alibabacloud_openplatform20191219 import Client","symbol":"Client","correct":"from alibabacloud_openplatform20191219.client import Client"},{"note":"Models are in the models submodule; no common wrong import known.","symbol":"AuthorizeFileUploadRequest","correct":"from alibabacloud_openplatform20191219.models import AuthorizeFileUploadRequest"}],"quickstart":{"code":"import os\nfrom alibabacloud_openplatform20191219.client import Client\nfrom alibabacloud_openplatform20191219.models import AuthorizeFileUploadRequest\nfrom alibabacloud_tea_openapi.models import Config\n\nconfig = Config(\n    access_key_id=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', ''),\n    access_key_secret=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', ''),\n    endpoint='openplatform.cn-shanghai.aliyuncs.com'\n)\nclient = Client(config)\nrequest = AuthorizeFileUploadRequest(\n    product='oss',\n    region_id='cn-shanghai'\n)\ntry:\n    response = client.authorize_file_upload(request)\n    print(response.to_map())\nexcept Exception as e:\n    print(e)","lang":"python","description":"Create a client, authorize a file upload for OSS. Requires valid Alibaba Cloud credentials set as environment variables."},"warnings":[{"fix":"Change 'from alibabacloud_openplatform20191219 import Client' to 'from alibabacloud_openplatform20191219.client import Client'.","message":"Version 2.0.0 changed the import structure. Previously, you could import Client directly from the top-level package; now you must import from the 'client' submodule.","severity":"breaking","affected_versions":"1.x -> 2.0.0"},{"fix":"Set the endpoint to the correct regional endpoint (e.g., 'openplatform.cn-shanghai.aliyuncs.com') in the Config.","message":"Endpoint configuration is required and varies by region. Using the wrong endpoint leads to connection errors.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `from alibabacloud_credentials.client import Client as CredClient` and pass the credential client to Config.","message":"The old way of passing credentials directly in the constructor (using `access_key_id` etc.) is still supported but deprecated. Prefer using a Credential client from alibabacloud_credentials.","severity":"deprecated","affected_versions":"2.0.0+"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Use 'from alibabacloud_openplatform20191219.client import Client'.","cause":"Importing Client from the top-level package (wrong import path).","error":"AttributeError: module 'alibabacloud_openplatform20191219' has no attribute 'Client'"},{"fix":"Ensure region_id is set in the request, e.g., AuthorizeFileUploadRequest(region_id='cn-shanghai').","cause":"Missing or incorrect region_id in request parameters.","error":"TeaException: RegionId is mandatory. Can not be empty."}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}