Registry / devops / alibabacloud-gateway-sls-util

alibabacloud-gateway-sls-util

JSON →
library0.4.1pypypi✓ verified 84d ago

Utility library for Alibaba Cloud SLS (Log Service) gateway, providing common helpers for authentication, serialization, and HTTP communication. Current version 0.4.1, requires Python >=3.7. Release cadence is irregular, driven by SLS API changes.

pip install alibabacloud-gateway-sls-util
INSTALL
IMPORT
SIG · ALIBABACLOUD-GATEW
A
alibabacloud-gateway-sls-util
devopspythonv0.4.1
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Client
from alibabacloud_gateway_sls_util.client import Client
Correct import path for the main client class

Creates a simple GET request to an SLS logstore using the gateway client. Replace host and path with your actual endpoints.

import os from alibabacloud_gateway_sls_util.client import Client from alibabacloud_gateway_sls_util import models as gateway_models client = Client() request = gateway_models.GatewayRequest( host="cn-hangzhou.log.aliyuncs.com", path="/logstores/example-store", method="GET", headers={"x-log-apiversion": "0.6.0"}, body=b"" ) response = client.do_request(request) print(response.body.decode())
Debug
Known issues
breakingIn version 0.4.0, the Client class was moved from alibabacloud_gateway_sls_util to alibabacloud_gateway_sls_util.client. Code using old import will break.
fix
Change import to: from alibabacloud_gateway_sls_util.client import Client
affects: >=0.4.0
deprecatedThe method `do_request` is deprecated in favor of `do_request_with_options` to support request options like timeouts.
fix
Use `client.do_request_with_options(request, runtime_options)` instead.
affects: >=0.3.5
gotchaThe library requires the `alibabacloud_gateway-spi` package. Missing it leads to confusing import errors.
fix
Install the dependency: pip install alibabacloud-gateway-spi
affects: all
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'alibabacloud_gateway_spi'
Missing runtime dependency alibabacloud-gateway-spi.
fix
pip install alibabacloud-gateway-spi
AttributeError: module 'alibabacloud_gateway_sls_util' has no attribute 'Client'
Importing Client from the wrong path. In 0.4.0+, Client is in submodule 'client'.
fix
from alibabacloud_gateway_sls_util.client import Client
Upgrade
Version history
0.4.1latest on PyPI · released Apr 13, 2026
Audit
Dependencies
alibabacloud-gateway-spirequiredRequired for SPIClient interface
Agent activity
30 hits · last 30 days
node
22
OpenAI (training)
2
Resources
alibabacloud-gateway-sls-util — pip install alibabacloud-gateway-sls-util · libregistry