aliyun-log-python-sdk 0.9.28__tar.gz → 0.9.30__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. {aliyun_log_python_sdk-0.9.28/aliyun_log_python_sdk.egg-info → aliyun_log_python_sdk-0.9.30}/PKG-INFO +1 -1
  2. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/__init__.py +5 -1
  3. aliyun_log_python_sdk-0.9.30/aliyun/log/async_sql_pb2.py +29 -0
  4. aliyun_log_python_sdk-0.9.30/aliyun/log/async_sql_response.py +170 -0
  5. aliyun_log_python_sdk-0.9.30/aliyun/log/delete_async_sql_request.py +37 -0
  6. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_kv.py +1 -0
  7. aliyun_log_python_sdk-0.9.30/aliyun/log/get_async_sql_request.py +75 -0
  8. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logclient.py +105 -2
  9. aliyun_log_python_sdk-0.9.30/aliyun/log/submit_async_sql_request.py +153 -0
  10. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/util.py +10 -0
  11. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/version.py +1 -1
  12. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30/aliyun_log_python_sdk.egg-info}/PKG-INFO +1 -1
  13. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun_log_python_sdk.egg-info/SOURCES.txt +7 -1
  14. aliyun_log_python_sdk-0.9.30/tests/test_util.py +16 -0
  15. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/LICENSE +0 -0
  16. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/README.md +0 -0
  17. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/__init__.py +0 -0
  18. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/_proto_py2/__init__.py +0 -0
  19. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/_proto_py2/log_logs_pb2.py +0 -0
  20. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/_proto_py2/log_logs_raw_pb2.py +0 -0
  21. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/acl_config.py +0 -0
  22. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/acl_response.py +0 -0
  23. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/auth.py +0 -0
  24. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/common_response.py +0 -0
  25. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/compress.py +0 -0
  26. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/__init__.py +0 -0
  27. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/checkpoint_tracker.py +0 -0
  28. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/config.py +0 -0
  29. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/consumer_client.py +0 -0
  30. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/exceptions.py +0 -0
  31. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/fetched_log_group.py +0 -0
  32. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/heart_beat.py +0 -0
  33. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/shard_worker.py +0 -0
  34. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/tasks.py +0 -0
  35. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer/worker.py +0 -0
  36. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer_group_request.py +0 -0
  37. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/consumer_group_response.py +0 -0
  38. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/credentials.py +0 -0
  39. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/cursor_response.py +0 -0
  40. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/cursor_time_response.py +0 -0
  41. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/deletelogsrequest.py +0 -0
  42. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/deletelogssresponse.py +0 -0
  43. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/__init__.py +0 -0
  44. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/doc_logitem_converter.py +0 -0
  45. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/index_logstore_mappings.py +0 -0
  46. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/mapping_index_converter.py +0 -0
  47. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/migration_log.py +0 -0
  48. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/migration_manager.py +0 -0
  49. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/migration_response.py +0 -0
  50. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/migration_task.py +0 -0
  51. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/es_migration/util.py +0 -0
  52. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_config_response.py +0 -0
  53. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/__init__.py +0 -0
  54. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/config_parser.py +0 -0
  55. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/etl_util.py +0 -0
  56. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/exceptions.py +0 -0
  57. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/restrict_config_parser.py +0 -0
  58. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/runner.py +0 -0
  59. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/settings.py +0 -0
  60. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/__init__.py +0 -0
  61. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_base.py +0 -0
  62. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_csv.py +0 -0
  63. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_json.py +0 -0
  64. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_lookup.py +0 -0
  65. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_mv.py +0 -0
  66. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_regex.py +0 -0
  67. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/trans_comp/trans_set_field.py +0 -0
  68. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/__init__.py +0 -0
  69. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/condition_list.py +0 -0
  70. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/condition_transform.py +0 -0
  71. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/condition_util.py +0 -0
  72. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/transform_base.py +0 -0
  73. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/transform_list.py +0 -0
  74. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/etl_core/transform/transform_meta.py +0 -0
  75. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/export_response.py +0 -0
  76. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/ext/__init__.py +0 -0
  77. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/ext/jupyter_magic.py +0 -0
  78. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/ext/syslogclient.py +0 -0
  79. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/external_store_config.py +0 -0
  80. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/external_store_config_response.py +0 -0
  81. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/getcontextlogsresponse.py +0 -0
  82. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/getdeletelogsstatusrequest.py +0 -0
  83. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/getdeletelogsstatusresponse.py +0 -0
  84. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/gethistogramsrequest.py +0 -0
  85. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/gethistogramsresponse.py +0 -0
  86. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/getlogsrequest.py +0 -0
  87. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/getlogsresponse.py +0 -0
  88. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/histogram.py +0 -0
  89. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/index_config.py +0 -0
  90. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/index_config_response.py +0 -0
  91. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/ingestion_response.py +0 -0
  92. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/job.py +0 -0
  93. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listdeletelogsstasksrequest.py +0 -0
  94. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listdeletelogsstasksresponse.py +0 -0
  95. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listlogstoresrequest.py +0 -0
  96. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listlogstoresresponse.py +0 -0
  97. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listtopicsrequest.py +0 -0
  98. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/listtopicsresponse.py +0 -0
  99. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/log_logs_pb2.py +0 -0
  100. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/log_logs_raw_pb2.py +0 -0
  101. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logclient_core.py +0 -0
  102. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logclient_operator.py +0 -0
  103. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logexception.py +0 -0
  104. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logger_hanlder.py +0 -0
  105. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logitem.py +0 -0
  106. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logrequest.py +0 -0
  107. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logresponse.py +0 -0
  108. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logstore_config_response.py +0 -0
  109. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logtail_config_detail.py +0 -0
  110. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/logtail_config_response.py +0 -0
  111. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/machine_group_detail.py +0 -0
  112. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/machinegroup_response.py +0 -0
  113. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/metering_mode_response.py +0 -0
  114. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/odps_sink.py +0 -0
  115. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/oss_sink.py +0 -0
  116. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/pluralize.py +0 -0
  117. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/project_response.py +0 -0
  118. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/proto.py +0 -0
  119. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/pulllog_response.py +0 -0
  120. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/putlogsrequest.py +0 -0
  121. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/putlogsresponse.py +0 -0
  122. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/queriedlog.py +0 -0
  123. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/rebuild_index_response.py +0 -0
  124. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/resource_params.py +0 -0
  125. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/resource_response.py +0 -0
  126. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/scheduled_sql.py +0 -0
  127. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/scheduled_sql_response.py +0 -0
  128. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/shard_response.py +0 -0
  129. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/shipper_config.py +0 -0
  130. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/shipper_response.py +0 -0
  131. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/sink.py +0 -0
  132. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/sql_instance_response.py +0 -0
  133. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/store_view.py +0 -0
  134. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/store_view_response.py +0 -0
  135. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/substore_config_response.py +0 -0
  136. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/tag_response.py +0 -0
  137. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/topostore_params.py +0 -0
  138. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun/log/topostore_response.py +0 -0
  139. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun_log_python_sdk.egg-info/dependency_links.txt +0 -0
  140. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun_log_python_sdk.egg-info/requires.txt +0 -0
  141. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/aliyun_log_python_sdk.egg-info/top_level.txt +0 -0
  142. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/setup.cfg +0 -0
  143. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/setup.py +0 -0
  144. {aliyun_log_python_sdk-0.9.28 → aliyun_log_python_sdk-0.9.30}/tests/test_alert.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.28
3
+ Version: 0.9.30
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun
@@ -49,4 +49,8 @@ from .metering_mode_response import GetLogStoreMeteringModeResponse, \
49
49
 
50
50
 
51
51
  from .store_view import StoreView, StoreViewStore
52
- from .store_view_response import CreateStoreViewResponse, UpdateStoreViewResponse, DeleteStoreViewResponse, ListStoreViewsResponse, GetStoreViewResponse
52
+ from .store_view_response import CreateStoreViewResponse, UpdateStoreViewResponse, DeleteStoreViewResponse, ListStoreViewsResponse, GetStoreViewResponse
53
+ from .submit_async_sql_request import SubmitAsyncSqlRequest
54
+ from .get_async_sql_request import GetAsyncSqlRequest
55
+ from .async_sql_response import AsyncSqlResponse
56
+ from .async_sql_pb2 import AsyncSqlResponsePB
@@ -0,0 +1,29 @@
1
+ # -*- coding: utf-8 -*-
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: async_sql.proto
4
+ """Generated protocol buffer code."""
5
+ from google.protobuf.internal import builder as _builder
6
+ from google.protobuf import descriptor as _descriptor
7
+ from google.protobuf import descriptor_pool as _descriptor_pool
8
+ from google.protobuf import symbol_database as _symbol_database
9
+ # @@protoc_insertion_point(imports)
10
+
11
+ _sym_db = _symbol_database.Default()
12
+
13
+
14
+
15
+
16
+ DESCRIPTOR = _descriptor_pool.Default().AddSerializedFile(b'\n\x0f\x61sync_sql.proto\"\xb1\x01\n\x0e\x41syncSqlMetaPB\x12\x13\n\x0bresult_rows\x18\x01 \x01(\x05\x12\x16\n\x0eprocessed_rows\x18\x02 \x01(\x03\x12\x17\n\x0fprocessed_bytes\x18\x03 \x01(\x03\x12\x15\n\relapsed_milli\x18\x04 \x01(\x03\x12\x0f\n\x07\x63pu_sec\x18\x05 \x01(\x01\x12\x11\n\tcpu_cores\x18\x06 \x01(\x03\x12\x10\n\x08progress\x18\x07 \x01(\t\x12\x0c\n\x04keys\x18\x08 \x03(\t\" \n\rAsyncSqlRowPB\x12\x0f\n\x07\x63olumns\x18\x01 \x03(\t\"\x97\x01\n\x12\x41syncSqlResponsePB\x12\n\n\x02id\x18\x01 \x02(\t\x12\r\n\x05state\x18\x02 \x02(\t\x12\x1d\n\x04meta\x18\x03 \x01(\x0b\x32\x0f.AsyncSqlMetaPB\x12\x1c\n\x04rows\x18\x04 \x03(\x0b\x32\x0e.AsyncSqlRowPB\x12\x12\n\nerror_code\x18\x05 \x01(\t\x12\x15\n\rerror_message\x18\x06 \x01(\t')
17
+
18
+ _builder.BuildMessageAndEnumDescriptors(DESCRIPTOR, globals())
19
+ _builder.BuildTopDescriptorsAndMessages(DESCRIPTOR, 'async_sql_pb2', globals())
20
+ if _descriptor._USE_C_DESCRIPTORS == False:
21
+
22
+ DESCRIPTOR._options = None
23
+ _ASYNCSQLMETAPB._serialized_start=20
24
+ _ASYNCSQLMETAPB._serialized_end=197
25
+ _ASYNCSQLROWPB._serialized_start=199
26
+ _ASYNCSQLROWPB._serialized_end=231
27
+ _ASYNCSQLRESPONSEPB._serialized_start=234
28
+ _ASYNCSQLRESPONSEPB._serialized_end=385
29
+ # @@protoc_insertion_point(module_scope)
@@ -0,0 +1,170 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logresponse import LogResponse
8
+ from .async_sql_pb2 import AsyncSqlResponsePB
9
+ from .compress import Compressor
10
+
11
+
12
+ def _get_or_default(pb, field, default):
13
+ if pb is None:
14
+ return default
15
+ return pb.HasField(field) and getattr(pb, field) or default
16
+
17
+ class AsyncSqlResponse(LogResponse):
18
+ """ The response used for async SQL operations.
19
+
20
+ :type header: dict
21
+ :param header: response header
22
+
23
+ :type resp: string
24
+ :param resp: response data
25
+ """
26
+
27
+ def __init__(self, header, resp):
28
+ LogResponse.__init__(self, header, resp)
29
+ self.async_sql_response_pb = AsyncSqlResponsePB()
30
+ if resp:
31
+ try:
32
+ raw_data = Compressor.decompress_response(header, resp)
33
+ self.async_sql_response_pb.ParseFromString(raw_data)
34
+ except Exception as ex:
35
+ raise Exception("Failed to parse AsyncSqlResponsePB: {0}".format(ex))
36
+
37
+ def get_query_id(self):
38
+ """ Get async SQL query ID
39
+
40
+ :return: string, query ID
41
+ """
42
+ return self.async_sql_response_pb.id
43
+
44
+ def get_state(self):
45
+ """ Get async SQL query state
46
+
47
+ :return: string, query state (e.g., "RUNNING", "COMPLETE", "FAILED")
48
+ """
49
+ return self.async_sql_response_pb.state
50
+
51
+ def get_error_code(self):
52
+ """ Get error code if query failed
53
+
54
+ :return: string, error code
55
+ """
56
+ return _get_or_default(self.async_sql_response_pb, 'error_code', None)
57
+
58
+ def get_error_message(self):
59
+ """ Get error message if query failed
60
+
61
+ :return: string, error message
62
+ """
63
+ return _get_or_default(self.async_sql_response_pb, 'error_message', None)
64
+
65
+ def get_meta(self):
66
+ """ Get query metadata
67
+
68
+ :return: AsyncSqlMetaPB, query metadata
69
+ """
70
+ return _get_or_default(self.async_sql_response_pb, 'meta', None)
71
+
72
+ def get_result_rows(self):
73
+ """ Get number of result rows
74
+
75
+ :return: int, number of result rows
76
+ """
77
+ meta = self.get_meta()
78
+ return _get_or_default(meta, 'result_rows', 0)
79
+
80
+ def get_processed_rows(self):
81
+ """ Get number of processed rows
82
+
83
+ :return: int, number of processed rows
84
+ """
85
+ meta = self.get_meta()
86
+ return _get_or_default(meta, 'processed_rows', 0)
87
+
88
+ def get_processed_bytes(self):
89
+ """ Get number of processed bytes
90
+
91
+ :return: int, number of processed bytes
92
+ """
93
+ meta = self.get_meta()
94
+ return _get_or_default(meta, 'processed_bytes', 0)
95
+
96
+ def get_elapsed_milli(self):
97
+ """ Get elapsed time in milliseconds
98
+
99
+ :return: int, elapsed time in milliseconds
100
+ """
101
+ meta = self.get_meta()
102
+ return _get_or_default(meta, 'elapsed_milli', 0)
103
+
104
+ def get_cpu_sec(self):
105
+ """ Get CPU time in seconds
106
+
107
+ :return: float, CPU time in seconds
108
+ """
109
+ meta = self.get_meta()
110
+ return _get_or_default(meta, 'cpu_sec', 0.0)
111
+
112
+ def get_cpu_cores(self):
113
+ """ Get CPU cores used
114
+
115
+ :return: int, CPU cores used
116
+ """
117
+ meta = self.get_meta()
118
+ return _get_or_default(meta, 'cpu_cores', 0)
119
+
120
+ def get_progress(self):
121
+ """ Get query progress
122
+
123
+ :return: string, query progress
124
+ """
125
+ meta = self.get_meta()
126
+ return _get_or_default(meta, 'progress', '')
127
+
128
+ def get_keys(self):
129
+ """ Get column names/keys
130
+
131
+ :return: list, column names
132
+ """
133
+ meta = self.get_meta()
134
+ return list(meta.keys) if meta else []
135
+
136
+ def get_rows(self):
137
+ """ Get result rows
138
+
139
+ :return: list, result rows data
140
+ """
141
+ rows = []
142
+ for row_pb in self.async_sql_response_pb.rows:
143
+ rows.append(list(row_pb.columns))
144
+ return rows
145
+
146
+ def get_raw_response_pb(self):
147
+ """ Get raw protobuf response
148
+
149
+ :return: AsyncSqlResponsePB, raw protobuf response
150
+ """
151
+ return self.async_sql_response_pb
152
+
153
+ def log_print(self):
154
+ """ Print response information for debugging
155
+ """
156
+ print("AsyncSqlResponse:")
157
+ print(" Query ID: {0}".format(self.get_query_id()))
158
+ print(" State: {0}".format(self.get_state()))
159
+ print(" Result Rows: {0}".format(self.get_result_rows()))
160
+ print(" Processed Rows: {0}".format(self.get_processed_rows()))
161
+ print(" Processed Bytes: {0}".format(self.get_processed_bytes()))
162
+ print(" Elapsed Time: {0}ms".format(self.get_elapsed_milli()))
163
+ print(" CPU Time: {0}s".format(self.get_cpu_sec()))
164
+ print(" CPU Cores: {0}".format(self.get_cpu_cores()))
165
+ print(" Progress: {0}".format(self.get_progress()))
166
+ if self.get_error_code():
167
+ print(" Error Code: {0}".format(self.get_error_code()))
168
+ print(" Error Message: {0}".format(self.get_error_message()))
169
+ print(" Column Names: {0}".format(self.get_keys()))
170
+ print(" Data Rows: {0}".format(len(self.get_rows())))
@@ -0,0 +1,37 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+
9
+
10
+ class DeleteAsyncSqlRequest(LogRequest):
11
+ """ The request used to delete async SQL query.
12
+
13
+ :type project: string
14
+ :param project: project name
15
+
16
+ :type query_id: string
17
+ :param query_id: async SQL query ID
18
+ """
19
+
20
+ def __init__(self, project=None, query_id=None):
21
+ LogRequest.__init__(self, project)
22
+ self.query_id = query_id
23
+
24
+ def get_query_id(self):
25
+ """ Get query ID
26
+
27
+ :return: string, query ID
28
+ """
29
+ return self.query_id if self.query_id else ''
30
+
31
+ def set_query_id(self, query_id):
32
+ """ Set query ID
33
+
34
+ :type query_id: string
35
+ :param query_id: query ID
36
+ """
37
+ self.query_id = query_id
@@ -1,3 +1,4 @@
1
+ # -*- coding: utf-8 -*-
1
2
  import logging
2
3
  try:
3
4
  from collections.abc import Iterable
@@ -0,0 +1,75 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+
9
+
10
+ class GetAsyncSqlRequest(LogRequest):
11
+ """ The request used to get async SQL query results.
12
+
13
+ :type project: string
14
+ :param project: project name
15
+
16
+ :type query_id: string
17
+ :param query_id: async SQL query ID
18
+
19
+ :type offset: int
20
+ :param offset: line offset of return logs
21
+
22
+ :type line: int
23
+ :param line: max line number of return logs
24
+ """
25
+
26
+ def __init__(self, project=None, query_id=None, offset=0, line=100):
27
+ LogRequest.__init__(self, project)
28
+ self.query_id = query_id
29
+ self.offset = offset
30
+ self.line = line
31
+
32
+ def get_query_id(self):
33
+ """ Get query ID
34
+
35
+ :return: string, query ID
36
+ """
37
+ return self.query_id if self.query_id else ''
38
+
39
+ def set_query_id(self, query_id):
40
+ """ Set query ID
41
+
42
+ :type query_id: string
43
+ :param query_id: query ID
44
+ """
45
+ self.query_id = query_id
46
+
47
+ def get_offset(self):
48
+ """ Get line offset of return logs
49
+
50
+ :return: int, line offset of return logs
51
+ """
52
+ return self.offset
53
+
54
+ def set_offset(self, offset):
55
+ """ Set line offset of return logs
56
+
57
+ :type offset: int
58
+ :param offset: line offset of return logs
59
+ """
60
+ self.offset = offset
61
+
62
+ def get_line(self):
63
+ """ Get max line number of return logs
64
+
65
+ :return: int, max line number of return logs
66
+ """
67
+ return self.line
68
+
69
+ def set_line(self, line):
70
+ """ Set max line number of return logs
71
+
72
+ :type line: int
73
+ :param line: max line number of return logs
74
+ """
75
+ self.line = line
@@ -56,6 +56,8 @@ from .topostore_params import *
56
56
  from .util import base64_encodestring as b64e
57
57
  from .util import base64_encodestring as e64, base64_decodestring as d64, Util
58
58
  from .version import API_VERSION, USER_AGENT
59
+ if six.PY3:
60
+ from .async_sql_response import AsyncSqlResponse
59
61
 
60
62
  from .proto import LogGroupRaw as LogGroup
61
63
  from .external_store_config_response import *
@@ -71,6 +73,7 @@ from .compress import CompressType, Compressor
71
73
  from .metering_mode_response import GetLogStoreMeteringModeResponse, \
72
74
  GetMetricStoreMeteringModeResponse, UpdateLogStoreMeteringModeResponse, \
73
75
  UpdateMetricStoreMeteringModeResponse
76
+ from .util import require_python3
74
77
 
75
78
  logger = logging.getLogger(__name__)
76
79
 
@@ -962,6 +965,106 @@ class LogClient(object):
962
965
  request = GetProjectLogsRequest(project, sql, power_sql)
963
966
  return self.get_project_logs(request)
964
967
 
968
+ @require_python3
969
+ def submit_async_sql(self, request):
970
+ """ Submit async SQL query to log service.
971
+ Unsuccessful operation will cause an LogException.
972
+
973
+ :type request: SubmitAsyncSqlRequest
974
+ :param request: the submit async SQL request
975
+
976
+ :return: AsyncSqlResponse
977
+
978
+ :raise: LogException
979
+ """
980
+ project = request.get_project()
981
+
982
+ body = {
983
+ 'logstore': request.get_logstore(),
984
+ 'query': request.get_query(),
985
+ 'from': request.get_from(),
986
+ 'to': request.get_to()
987
+ }
988
+
989
+ extensions = {
990
+ 'powerSql': request.get_power_sql(),
991
+ 'allowIncomplete': request.get_allow_incomplete()
992
+ }
993
+
994
+ if request.get_max_run_time() is not None:
995
+ extensions['maxRunTime'] = request.get_max_run_time()
996
+
997
+ body['extensions'] = extensions
998
+
999
+ body_str = six.b(json.dumps(body))
1000
+ headers = {
1001
+ 'x-log-bodyrawsize': str(len(body_str)),
1002
+ 'Content-Type': 'application/json',
1003
+ 'Accept': 'application/x-protobuf',
1004
+ 'Accept-Encoding': str(CompressType.default_compress_type())
1005
+ }
1006
+
1007
+ params = {}
1008
+ resource = '/asyncsql'
1009
+ (resp, header) = self._send('POST', project, body_str, resource, params, headers, "binary")
1010
+ return AsyncSqlResponse(header, resp)
1011
+
1012
+ @require_python3
1013
+ def get_async_sql(self, request):
1014
+ """ Get async SQL query results from log service.
1015
+ Unsuccessful operation will cause an LogException.
1016
+
1017
+ :type request: GetAsyncSqlRequest
1018
+ :param request: the get async SQL request
1019
+
1020
+ :return: AsyncSqlResponse
1021
+
1022
+ :raise: LogException
1023
+ """
1024
+ project = request.get_project()
1025
+ query_id = request.get_query_id()
1026
+
1027
+ params = {
1028
+ 'offset': request.get_offset(),
1029
+ 'line': request.get_line()
1030
+ }
1031
+
1032
+ headers = {
1033
+ 'Content-Type': 'application/json',
1034
+ 'Accept': 'application/x-protobuf',
1035
+ 'Accept-Encoding': str(CompressType.default_compress_type())
1036
+ }
1037
+
1038
+ resource = '/asyncsql/' + query_id
1039
+ (resp, header) = self._send('GET', project, {}, resource, params, headers, "binary")
1040
+ return AsyncSqlResponse(header, resp)
1041
+
1042
+ @require_python3
1043
+ def delete_async_sql(self, request):
1044
+ """ Delete async SQL query from log service.
1045
+ Unsuccessful operation will cause an LogException.
1046
+
1047
+ :type request: DeleteAsyncSqlRequest
1048
+ :param request: the delete async SQL request
1049
+
1050
+ :return: AsyncSqlResponse
1051
+
1052
+ :raise: LogException
1053
+ """
1054
+ project = request.get_project()
1055
+ query_id = request.get_query_id()
1056
+
1057
+ headers = {
1058
+ 'Content-Type': 'application/json',
1059
+ 'Accept': 'application/x-protobuf',
1060
+ 'Accept-Encoding': str(CompressType.default_compress_type())
1061
+ }
1062
+
1063
+ params = {}
1064
+ resource = '/asyncsql/' + query_id
1065
+ (resp, header) = self._send('DELETE', project, {}, resource, params, headers, "binary")
1066
+ return AsyncSqlResponse(header, resp)
1067
+
965
1068
  def get_context_logs(self, project, logstore, pack_id, pack_meta, back_lines, forward_lines):
966
1069
  """ Get context logs of specified log from log service.
967
1070
  Unsuccessful operation will cause an LogException.
@@ -2863,7 +2966,7 @@ class LogClient(object):
2863
2966
  "tags": [{"key": str(k), "value": str(v)} for k, v in tags.items()],
2864
2967
  }
2865
2968
  body = json.dumps(body).encode()
2866
- resp, header = self._send("POST", None, body, resource, {}, {})
2969
+ resp, header = self._send("POST", project_name, body, resource, {}, {})
2867
2970
  return LogResponse(header, resp)
2868
2971
 
2869
2972
  def untag_project(self, project_name, *tag_keys):
@@ -2884,7 +2987,7 @@ class LogClient(object):
2884
2987
  "tags": tag_keys,
2885
2988
  }
2886
2989
  body = json.dumps(body).encode()
2887
- resp, header = self._send("POST", None, body, resource, {}, {})
2990
+ resp, header = self._send("POST", project_name, body, resource, {}, {})
2888
2991
  return LogResponse(header, resp)
2889
2992
 
2890
2993
  def get_project_tags(self, project_name, **filer_tags):
@@ -0,0 +1,153 @@
1
+ #!/usr/bin/env python
2
+ # encoding: utf-8
3
+
4
+ # Copyright (C) Alibaba Cloud Computing
5
+ # All rights reserved.
6
+
7
+ from .logrequest import LogRequest
8
+ from .util import parse_timestamp
9
+
10
+
11
+ class SubmitAsyncSqlRequest(LogRequest):
12
+ """ The request used to submit async SQL query.
13
+
14
+ :type project: string
15
+ :param project: project name
16
+
17
+ :type logstore: string
18
+ :param logstore: logstore name
19
+
20
+ :type query: string
21
+ :param query: SQL query string
22
+
23
+ :type fromTime: int/string
24
+ :param fromTime: the begin time, or format of time in format "%Y-%m-%d %H:%M:%S" e.g. "2018-01-02 12:12:10"
25
+
26
+ :type toTime: int/string
27
+ :param toTime: the end time, or format of time in format "%Y-%m-%d %H:%M:%S" e.g. "2018-01-02 12:12:10"
28
+
29
+ :type power_sql: bool
30
+ :param power_sql: if power_sql is set to true, the query will run on enhanced sql mode
31
+
32
+ :type allow_incomplete: bool
33
+ :param allow_incomplete: if allow_incomplete is set to true, incomplete results are allowed
34
+
35
+ :type max_run_time: int
36
+ :param max_run_time: maximum execution time in seconds
37
+ """
38
+
39
+ def __init__(self, project=None, logstore=None, query=None, fromTime=None, toTime=None,
40
+ power_sql=False, allow_incomplete=True, max_run_time=None):
41
+ LogRequest.__init__(self, project)
42
+ self.logstore = logstore
43
+ self.query = query
44
+ self.fromTime = parse_timestamp(fromTime) if fromTime is not None else fromTime
45
+ self.toTime = parse_timestamp(toTime) if toTime is not None else toTime
46
+ self.power_sql = power_sql
47
+ self.allow_incomplete = allow_incomplete
48
+ self.max_run_time = max_run_time
49
+
50
+ def get_logstore(self):
51
+ """ Get logstore name
52
+
53
+ :return: string, logstore name
54
+ """
55
+ return self.logstore if self.logstore else ''
56
+
57
+ def set_logstore(self, logstore):
58
+ """ Set logstore name
59
+
60
+ :type logstore: string
61
+ :param logstore: logstore name
62
+ """
63
+ self.logstore = logstore
64
+
65
+ def get_query(self):
66
+ """ Get SQL query string
67
+
68
+ :return: string, SQL query string
69
+ """
70
+ return self.query
71
+
72
+ def set_query(self, query):
73
+ """ Set SQL query string
74
+
75
+ :type query: string
76
+ :param query: SQL query string
77
+ """
78
+ self.query = query
79
+
80
+ def get_from(self):
81
+ """ Get begin time
82
+
83
+ :return: int, begin time
84
+ """
85
+ return self.fromTime
86
+
87
+ def set_from(self, fromTime):
88
+ """ Set begin time
89
+
90
+ :type fromTime: int
91
+ :param fromTime: begin time
92
+ """
93
+ self.fromTime = fromTime
94
+
95
+ def get_to(self):
96
+ """ Get end time
97
+
98
+ :return: int, end time
99
+ """
100
+ return self.toTime
101
+
102
+ def set_to(self, toTime):
103
+ """ Set end time
104
+
105
+ :type toTime: int
106
+ :param toTime: end time
107
+ """
108
+ self.toTime = toTime
109
+
110
+ def get_power_sql(self):
111
+ """ Get power_sql flag
112
+
113
+ :return: bool, power_sql flag
114
+ """
115
+ return self.power_sql
116
+
117
+ def set_power_sql(self, power_sql):
118
+ """ Set power_sql flag
119
+
120
+ :type power_sql: bool
121
+ :param power_sql: power_sql flag
122
+ """
123
+ self.power_sql = power_sql
124
+
125
+ def get_allow_incomplete(self):
126
+ """ Get allow_incomplete flag
127
+
128
+ :return: bool, allow_incomplete flag
129
+ """
130
+ return self.allow_incomplete
131
+
132
+ def set_allow_incomplete(self, allow_incomplete):
133
+ """ Set allow_incomplete flag
134
+
135
+ :type allow_incomplete: bool
136
+ :param allow_incomplete: allow_incomplete flag
137
+ """
138
+ self.allow_incomplete = allow_incomplete
139
+
140
+ def get_max_run_time(self):
141
+ """ Get max_run_time
142
+
143
+ :return: int, max_run_time
144
+ """
145
+ return self.max_run_time
146
+
147
+ def set_max_run_time(self, max_run_time):
148
+ """ Set max_run_time
149
+
150
+ :type max_run_time: int
151
+ :param max_run_time: maximum execution time in seconds
152
+ """
153
+ self.max_run_time = max_run_time
@@ -17,6 +17,7 @@ from .logexception import LogException
17
17
  import re
18
18
  import logging
19
19
  import json
20
+ import functools
20
21
 
21
22
 
22
23
  logger = logging.getLogger(__name__)
@@ -313,3 +314,12 @@ def export_deserialize(obj, sink):
313
314
  },
314
315
  "type": obj.getType(),
315
316
  })
317
+
318
+
319
+ def require_python3(func):
320
+ @functools.wraps(func)
321
+ def wrapper(*args, **kwargs):
322
+ if not six.PY3:
323
+ raise RuntimeError("Function '{func_name}' requires Python 3 to run.".format(func_name=func.__name__))
324
+ return func(*args, **kwargs)
325
+ return wrapper
@@ -1,4 +1,4 @@
1
- __version__ = '0.9.28'
1
+ __version__ = '0.9.30'
2
2
 
3
3
  import sys
4
4
  OS_VERSION = str(sys.platform)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aliyun-log-python-sdk
3
- Version: 0.9.28
3
+ Version: 0.9.30
4
4
  Summary: Aliyun log service Python client SDK
5
5
  Home-page: https://github.com/aliyun/aliyun-log-python-sdk
6
6
  Author: Aliyun