--- id: aliyun-log-fastpb version: "0.3.0" license: MIT license_treatment: permissive maintenance: active --- # aliyun-log-fastpb — Fast protobuf serialization for Aliyun Log using PyO3 and quick-protobuf License: permissive · Maintenance: active · Downloads: 119.1K/mo ## What it is and what it does Aliyun-log-fastpb is a Rust-based protobuf serializer for Aliyun Log (SLS) data structures, designed to accelerate the conversion of log dictionaries into binary protobuf format. It wraps quick-protobuf and PyO3 to provide native-speed serialization without the overhead of pure-Python implementations. The package accepts log data as Python dictionaries containing LogItems (with timestamps and key-value content pairs), LogTags, topic, and source fields, then converts them directly to protobuf bytes suitable for transmission to Aliyun Log Service. The package supports three serialization modes: standard text-based content, binary data (for non-UTF-8 payloads), and nanosecond-precision timestamps via an optional TimeNs field. It targets Python 3.7 through 3.12 on CPython and PyPy, with precompiled wheels for x86_64, ARM, PowerPC, s390x, and i686 architectures across Linux, macOS, and Windows, plus musl-based systems. No runtime dependencies are required beyond Python itself. Use it for: - Batch-serialize application logs to protobuf for high-throughput ingestion into Aliyun Log Service. - Convert structured log events (with timestamps and key-value pairs) to binary format for network transmission. - Handle binary log payloads (e.g., encoded traces, metrics) that cannot be represented as UTF-8 strings. - Achieve nanosecond-precision event timing in log records for microsecond-scale event correlation. - Integrate log serialization into performance-critical paths where Python overhead is unacceptable. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Serializes Aliyun Log data structures to protobuf bytes using Rust-backed performance optimization, supporting standard text, binary, and nanosecond-precision timestamp fields. Yes, if you are sending logs to Aliyun Log Service and need faster protobuf serialization than pure-Python libraries provide. The Rust implementation, zero runtime dependencies, and broad platform coverage make it a straightforward drop-in for Aliyun-specific logging pipelines. Install friction is moderate due to compiled wheels, but prebuilt binaries cover most common environments. No known security issues and active maintenance status support adoption. ## Install pip install aliyun-log-fastpb uv add aliyun-log-fastpb poetry add aliyun-log-fastpb ## Installing aliyun-log-fastpb Before you install: Medium install friction due to compiled wheels; prebuilt binaries available for common platforms (x86_64, ARM, PowerPC, s390x on Linux/macOS/Windows, plus musl variants), but requires Python 3.7+ and may need fallback compilation on uncommon architectures. License in practice: MIT license permits unrestricted use, modification, and distribution with minimal restrictions—suitable for commercial and open-source projects. Quickstart: pip install aliyun-log-fastpb import aliyun_log_fastpb log_group = { "LogItems": [{"Time": 1234567890, "Contents": [{"Key": "level", "Value": "INFO"}]}], "Topic": "app-logs", "Source": "192.168.1.100" } pb_bytes = aliyun_log_fastpb.serialize_log_group(log_group) Requires Python 3.7 or later; binary wheels cover common platforms but uncommon architectures may require a Rust toolchain to compile. Verify before relying: - Whether the package is actively maintained beyond the 108 days since latest release (repo metadata unavailable). - Performance benchmarks comparing this implementation to pure-Python protobuf alternatives. - Compatibility with Aliyun Log Service API versions and any breaking changes in protobuf schema. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: medium - Maintenance: active - Downloads: 119.1K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags aliyun log protobuf serialization, fast protobuf encoding, log group serialization, aliyun sls protobuf, rust protobuf performance, binary log serialization, nanosecond timestamp logging, aliyun-log, protobuf-serialization, rust-backed [View on SkillFed](https://skillfed.io/packages/aliyun-log-fastpb) · [View on PyPI](https://pypi.org/project/aliyun-log-fastpb/)