Registry / aws / alibabacloud-sls20201230

alibabacloud-sls20201230

JSON →
library5.13.1pypypi✓ verified 84d ago

Official Alibaba Cloud SDK for Log Service (SLS) API version 2020-12-30. Supports log ingestion, query, indexing, dashboards, and more. Current version 5.12.1 (released 2025-07-07). Release cadence is irregular, typically with minor updates monthly. Requires Python >=3.7.

pip install alibabacloud-sls20201230
INSTALL
IMPORT
SIG · ALIBABACLOUD-SLS20
A
alibabacloud-sls20201230
awspythonv5.13.1
Install
14.7s avg
Import
2618ms
Disk
70MB
Pass rate
5/ 10
Env Coverage5 / 10
glibc
3.93.13
musl
3.93.13
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
musl
py 3.103.95 runs
build_error
glibc
py 3.103.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)
Debug
Known issues
breakingVersion 4.x to 5.x drops support for Python 2.7. Requires Python >=3.7. All imports changed to snake_case packages.
fix
Use from alibabacloud_sls20201230.client import Client instead of from aliyunsdksls.client import Client.
affects: >=5.0.0
gotchaAPI endpoint must be specified for regions outside mainland China. Default endpoint (cn-hangzhou) may not work for international regions.
fix
Set endpoint via client._endpoint = 'https://sls.ap-southeast-1.aliyuncs.com' or use region in credential.
affects: all
deprecatedThe list_logstore method returns only 100 log stores by default. Pagination must be handled manually if more exist.
fix
Use offset and size parameters in ListLogStoreRequest to paginate.
affects: all
Errors
Common errors & fixes
AttributeError: module 'alibabacloud_sls20201230' has no attribute 'Client'
Client is not imported correctly; must import from client module.
fix
from 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.
fix
Ensure 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.
fix
Check 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).
fix
Use 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
Agent activity
30 hits · last 30 days
node
24
Resources
alibabacloud-sls20201230 — pip install alibabacloud-sls20201230 · libregistry