Registry /
aws / alibabacloud-sls20201230
Install & Compatibility
Where this runs
tested against v5.13.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
muslpy 3.10–3.95 runs
build_error
glibcpy 3.10–3.95 runs
installs and imports cleanly · install 14.7s · import 2.618s · 69MB
70MB installed
● package 70MB
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
Client
✓ from alibabacloud_sls20201230.client import Client
✗ from alibabacloud_sls20201230 import Client
Client is not in top-level package; must import from client module.
GetLogsRequest
✓ from alibabacloud_sls20201230.models import GetLogsRequest
✗ from alibabacloud_sls20201230 import GetLogsRequest
Models are in models submodule.
models
✓ from alibabacloud_sls20201230 import models
✗ import alibabacloud_sls20201230.models
Simpler to import the module.
Initialize client with credentials and list projects.
import os
from alibabacloud_sls20201230.client import Client
from alibabacloud_sls20201230 import models
from alibabacloud_credentials.client import CredentialClient
credential = CredentialClient(
access_key_id=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_ID', ''),
access_key_secret=os.environ.get('ALIBABA_CLOUD_ACCESS_KEY_SECRET', ''),
)
client = Client(credential)
# List projects
req = models.ListProjectRequest()
resp = client.list_project(req)
print(resp.body.total)
Errors
Common errors & fixes
AttributeError: module 'alibabacloud_sls20201230' has no attribute 'Client'
Client is not imported correctly; must import from client module.
fixfrom alibabacloud_sls20201230.client import Client
SDKError: InvalidAccessKeySecret. Specified access key secret is not valid.
Access credentials are incorrect or not properly set via environment variables.
fixEnsure ALIBABA_CLOUD_ACCESS_KEY_ID and ALIBABA_CLOUD_ACCESS_KEY_SECRET are set correctly.
Exception: 'NoneType' object has no attribute 'total'
Response may be empty if project does not exist or endpoint is wrong.
fixCheck endpoint configuration and ensure project exists. Validate response before accessing fields.
UnicodeEncodeError: 'ascii' codec can't encode characters
Python 2 compatibility issue; only relevant when using Python 2 (unsupported on >=5.x).
fixUse Python >=3.7. For Python 2, stick to alibabacloud-sls20201230 <5.0.0.
Upgrade
Version history
5.13.1latest on PyPI · released Jun 12, 2026
Audit
Dependencies
alibabacloud_credentialsrequiredCredential management and authentication