Skip to main content

PopLine Python

PopLine 序列化格式的 Python C 扩展实现。零外部依赖。

v0.4.0: 解析改用 SAX 接口(pln_sax_parse)直接构建 Python 对象,序列化使用 C 核心生成器 API,均无中间 pln_value_t DOM。

安装

pip install popline-py

使用

import pln

# PopLine → Python 对象(SAX 解析,零 DOM)
obj = pln.loads('{\nkey: "value"\n')
# → {"key": "value"}

# Python 对象 → PopLine(生成器 API,不经过中间 DOM)
text = pln.dumps({"key": "value"})
# → '{\nkey: "value"\n'

性能

测试数据:test.json(17011 B)→ test.pln(13076 B,76.9%),5000 次迭代

操作 Python json pln 比
解析 701 ms (140 µs/op) 623 ms (125 µs/op) 0.89x
序列化 943 ms (189 µs/op) 237 ms (47 µs/op) 0.25x

测试

python test.py

致谢

本项目的开发得到了以下 AI 工具的大力协助:

Metadata

Release files for popline-py 0.5.1

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

Source distribution (sdist)

Source distribution for popline-py 0.5.1
File Size Uploaded Provenance Actions
popline_py-0.5.1.tar.gz 16.1 kB With provenance Details for popline_py-0.5.1.tar.gz

Release files / popline_py-0.5.1.tar.gz

Download URL popline_py-0.5.1.tar.gz
Size 16.1 kB
Tags Source
SHA-256 checksum
How to use checksums
275f473b1dab62d3949fd61a4e1b0130d3fc99b0eab167dc88e513fc65aeca4d
BLAKE2b-256 checksum
How to use checksums
9e11d2abaf9ddfe0990195ea6347f3a84a1cd37989bd47b236c5c65d20eadd7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log

Security for popline-py 0.5.1

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.

Full provenance

1 file in this release has been uploaded with provenance metadata.

Attestation for popline_py-0.5.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Aug 23, 2026.

Transparency log

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