Skip to main content

PopLine — Line-oriented serialization format (C extension)

Project description

PopLine Python

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

安装

pip install popline-py

使用

import pln

# PopLine → Python 对象
obj = pln.loads('{\nkey: "value"\n')
# → {"key": "value"}

# Python 对象 → PopLine
text = pln.dumps({"key": "value"})
# → '{\nkey: "value"\n'

性能

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

操作 Python json pln
解析 689 ms (137 µs/op) 626 ms (125 µs/op) 0.91x
序列化 935 ms (187 µs/op) 213 ms (42 µs/op) 0.23x

测试

python test.py

致谢

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

popline_py-0.4.0.tar.gz (14.2 kB view details)

Uploaded Source

File details

Details for the file popline_py-0.4.0.tar.gz.

File metadata

  • Download URL: popline_py-0.4.0.tar.gz
  • Upload date:
  • Size: 14.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.12

File hashes

Hashes for popline_py-0.4.0.tar.gz
Algorithm Hash digest
SHA256 05349daf2ab906d74cbaeea450c49fe73584c73d101123b4e4bb32062a716657
MD5 092dad6aa711abfbf10cc37caa6b8b97
BLAKE2b-256 dab074f06b9e0609741c5be67bf2b6c749df124d462684d3efdc4cf8415cc664

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page