aliyun-log-python-sdk
Aliyun log service Python client SDK
What it is and what it does
This is the official Python SDK for Alibaba Cloud Log Service, a managed logging platform. It provides programmatic access to all Log Service REST APIs, including log ingestion, querying, project/logstore management, and consumer group operations. The SDK wraps low-level HTTP calls into higher-level Python classes and utilities, reducing boilerplate and handling common patterns like automatic pagination and retry logic.
The package includes specialized features for production use: a Python logging handler for direct integration with standard Python logging, high-level consumer group support for distributed log consumption, and ETL capabilities for cross-logstore data transformation and migration. It also supports Elasticsearch data migration. With 8 runtime dependencies (six, requests, python-dateutil, elasticsearch, jmespath, dateparser, protobuf, lz4), installation has moderate friction, but the SDK is actively maintained and supports Python versions from 2.7 through 3.12.
Use it for:
- Ingest application logs into Alibaba Cloud Log Service from Python applications for centralized log storage and analysis.
- Query and retrieve logs programmatically from Log Service for custom reporting, alerting, or post-processing workflows.
- Migrate log data from Elasticsearch or other sources into Alibaba Cloud Log Service using the SDK's migration utilities.
- Build ETL pipelines that transform and copy log data across multiple logstores within Log Service.
- Integrate Python's standard logging module with Alibaba Cloud Log Service via the provided logging handler.
- Manage Log Service projects and logstores (create, delete, update settings) from Python automation scripts.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Python SDK for Alibaba Cloud Log Service that wraps the REST API to enable log ingestion, querying, management, and ETL operations on Alibaba's cloud logging platform.
Yes, if you are already using Alibaba Cloud Log Service and need a Python client. The SDK is actively maintained, permissively licensed, has no known vulnerabilities, and provides comprehensive API coverage. The high install friction (8 dependencies) and legacy Python 2.7 support are minor drawbacks; modern Python versions (3.7+) are well-supported. Not relevant if you are not using Alibaba's logging platform.
Install
aliyun-log-python-sdk on PyPI
pip
pip install aliyun-log-python-sdkuv
uv add aliyun-log-python-sdkpoetry
poetry add aliyun-log-python-sdkInstalling aliyun-log-python-sdk
Before you install
High install friction due to 8 runtime dependencies including protobuf and lz4. Active maintenance with a recent release (1 day old) and steady repository activity, though the package targets both legacy Python 2.7 and modern versions.
License in practice
MIT license (permissive) means you can use, modify, and distribute this package freely in commercial and private projects with minimal restrictions.
Quickstart
pip install aliyun-log-python-sdk
from aliyun.log import LogClient
client = LogClient('endpoint', 'access_id', 'access_key')
logs = client.get_logs('project', 'logstore', 'query')
Requires Alibaba Cloud credentials (endpoint, access ID, access key) and an active Alibaba Cloud Log Service account.
Verify before relying
- Whether elasticsearch dependency is required for all use cases or only for migration features.
- Performance characteristics and throughput limits for high-volume log ingestion.
- Compatibility status with Python 2.7 given its EOL status and modern Python 3.12 support.
Package facts
| License | not declared (permissive) |
| Python support | not specified |
| Install friction | high — source build required |
| Runtime dependencies | 8 — six, requests, python-dateutil, elasticsearch, jmespath, dateparser, protobuf, lz4 |
| Maintenance | actively maintained — 1 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 411,703/month — #6,855 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: aliyun_log_python_sdk-0.9.50.tar.gz
Tags
More Internet packages
Botocore provides low-level, data-driven access…
permissive · top 100 on PyPI
aiobotocoreProvides an async client for AWS services using…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
filelockProvides a platform-independent file locking…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
googleapis-common-protosProvides common Protocol Buffer message…
permissive · top 100 on PyPI
alibabacloud-sls20201230Python SDK for Alibaba Cloud Log Service that…
permissive · top 15,000 on PyPI
alibabacloud-gateway-sls-utilProvides utility functions for Alibaba Cloud…
permissive · top 15,000 on PyPI
alibabacloud-gateway-slsProvides a gateway client for Alibaba Cloud's…
permissive · top 15,000 on PyPI
aliyun-log-fastpbSerializes Aliyun Log data structures to…
permissive · top 15,000 on PyPI
alibabacloud-actiontrail20200706Provides Python bindings to Alibaba Cloud's…
permissive · top 15,000 on PyPI
tablestorePython SDK for Aliyun Tablestore (OTS), a…
permissive · top 15,000 on PyPI
alibabacloud-openapi-utilProvides utility functions for constructing and…
permissive · top 5,000 on PyPI
alibabacloud-ecs20140526Provides a Python SDK for interacting with…
permissive · top 15,000 on PyPI
aliyun-python-sdk-coreProvides core client infrastructure for calling…
permissive · top 5,000 on PyPI
dashscopePython SDK for Alibaba Cloud Model Studio…
permissive · top 5,000 on PyPI