All Products
Search
Document Center

Simple Log Service:Python SDK overview

Last Updated:Jun 03, 2026

The Simple Log Service Python SDK provides programmatic access to most Simple Log Service API operations.

Version history

All releases are listed on the Aliyun Log Python Release page.

Sample code

The Python SDK includes the following code samples:

GitHub source code

Description

sample.py

Write and query logs, query Logstores, get log distribution, and manage machine groups.

sample2.py

Write logs, query logs by shard, and manage shards.

Sample3.py

Write logs, query logs by shard, manage shards, associate an external data source, and query logs.

sample_consumer.py

Consume logs with a consumer group.

test_alert.py

Basic alert operations.

sync_data_to_splunk.py

Synchronize data to Splunk with a consumer group.

sync_data_to_syslog.py

Synchronize data to a syslog server with a consumer group.

test_migration_manager.py

Create migration configurations and migrate data.

CreateETL

Create, modify, and delete data transformation tasks.

CreateOSSExport

Ship logs to OSS and MaxCompute.