Log Service SDK for Python encapsulates all API operations of Log Service. You can use Log Service SDK for Python to call all API operations of Log Service.
Versions
For more information, see Alibaba Cloud Log Service SDK for Python Releases.
Sample code
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 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. |
sample3.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. |