CdnClient
Last Updated:2020-09-17
Being the client of the CDN service, CdnClient provides a series of methods for developers to interact with the CDN service.
Create CdnClient
Access to CDN via AK/SK
You can create a CdnClient by referring to the following code:
"""
test/cdn/cdn_test_config.py
"""
HOST = 'cdn.baidubce.com'
"""
Your Secret Access Key
"""
AK = ' '
SK = ' '
"""
test/cdn/test_cdn_client.py
"""
import cdn_test_config
self.cdn_client = CdnClient(cdn_test_config.config)
In the above code, the variables AK and SK are assigned to user by the system, and they are strings used to identify the user and perform signature verification for accessing CDN. Among it, AK
corresponds to the “Access Key ID” in the console, and SK
corresponds to the “Access Key Secret” in the console.