Skip to main content

Lepak

Lepak is a lightweight, generic Alibaba Cloud OpenAPI client inspired by Boto3.

Chinese documentation: see README_CN.md.

Why Lepak

Compared with official Alibaba Cloud SDKs, Lepak focuses on low-friction integration:

  • One unified client for RPC-style services.
  • Plain dict request parameters instead of service-specific request classes.
  • Sync-first API with optional async support.

Installation

pip install lepak

Example 1: Basic Usage

import lepak

client = lepak.client(
    service_name="ecs",
    version="2014-05-26",
    access_key_id="your-ak",
    access_key_secret="your-sk",
    region_id="cn-hangzhou",
)

response = client.call(
    action="DescribeInstances",
    params={"PageSize": 10},
)

print(response)

Example 2: Official SDK Comparison

Lepak:

import lepak

client = lepak.client("ecs", "2014-05-26", "your-ak", "your-sk", "cn-hangzhou")
result = client.call("DescribeInstances", {"PageSize": 10})
print(result)

Official SDK (same action, more setup and product-specific models):

from alibabacloud_ecs20140526.client import Client as EcsClient
from alibabacloud_tea_openapi import models as open_api_models
from alibabacloud_ecs20140526 import models as ecs_models

config = open_api_models.Config(
    access_key_id="your-ak",
    access_key_secret="your-sk",
)
config.endpoint = "ecs.cn-hangzhou.aliyuncs.com"

client = EcsClient(config)
request = ecs_models.DescribeInstancesRequest(region_id="cn-hangzhou", page_size=10)
response = client.describe_instances(request)
print(response.body.to_map())

Example 3: Async Usage

import asyncio
import lepak

async def main():
    client = lepak.client(
        service_name="slb",
        version="2014-05-15",
        region_id="us-east-1",
    )
    result = await client.acall("DescribeLoadBalancers", {"PageSize": 2})
    print(result)

asyncio.run(main())

Example 4: RuntimeOptions Usage

import lepak
from alibabacloud_tea_util.models import RuntimeOptions

client = lepak.client("ecs", "2014-05-26", "your-ak", "your-sk", "cn-hangzhou")
runtime = RuntimeOptions(
    read_timeout=10000,
    connect_timeout=5000,
    autoretry=True,
    max_attempts=3,
)

result = client.call("DescribeInstances", {"PageSize": 5}, runtime=runtime)
print(result)

License

MIT

Metadata

Release files for lepak 0.1.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lepak 0.1.14
File Size Uploaded Provenance Actions
lepak-0.1.14.tar.gz 3.9 kB Without provenance Details for lepak-0.1.14.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for lepak 0.1.14
File Interpreter ABI Platform Actions
lepak-0.1.14-py3-none-any.whl Python 3 none any Details for lepak-0.1.14-py3-none-any.whl

Total release size: 7.8 kB

Release files / lepak-0.1.14.tar.gz

Download URL lepak-0.1.14.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
70061eb71606f6a0d575009ec727e097343b6b02c503cd55de96eff8d9ce7728
BLAKE2b-256 checksum
How to use checksums
312f287dc66427b8f5144ce432b719e20b8c90b8875b36d079134e86c91b4c8d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Release files / lepak-0.1.14-py3-none-any.whl

Download URL lepak-0.1.14-py3-none-any.whl
Size 3.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d5fc9fce0639d60a49462573668a01338f6beaeaa2d9aa5db7fce367289e92b
BLAKE2b-256 checksum
How to use checksums
a61c2ba48463d7b6eada6437e23469ab3532209c58cbea860c640c459c8e91c8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

Security for lepak 0.1.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page