All Products
Search
Document Center

Simple Log Service:Overview

Last Updated:Aug 07, 2024

Simple Log Service SDK for Python encapsulates most API operations of Simple Log Service. You can use Simple Log Service SDK for Python to call most API operations of Simple Log Service.

Versions

For more information, see Alibaba Cloud Simple Log Service SDK for Python Releases.

Sample code

Simple Log Service SDK for Python provides a variety of sample code that you can use or reference. The following table describes the sample code that is provided by Simple Log Service SDK for Python.

GitHub source code

Description

sample.py

Includes sample code that shows how to write logs, query Logstores, obtain the distribution of logs, and manage machine groups.

sample2.py

Includes sample code that shows how to write logs, query logs by shard, and manage shards.

Sample3.py

Includes sample code that shows how to write logs, query logs by shard, manage shards, create an external data source, and query logs.

sample_consumer.py

Includes sample code that shows how to use a consumer group to consume logs.

test_alert.py

Includes sample code that shows how to manage alerts.

sync_data_to_splunk.py

Includes sample code that shows how to use a consumer group to synchronize data to Splunk.

sync_data_to_syslog.py

Includes sample code that shows how to use a consumer group to synchronize data to a syslog server.

test_migration_manager.py

Includes sample code that shows how to create a migration configuration file and migrate data.

etl_test.py

Includes sample code that shows how to create, modify, and delete a data transformation task.

tests/export_examples

Includes sample code that shows how to ship logs to Object Storage Service (OSS) and MaxCompute.