Skip to main content

mainspring-session-sqlite

SQLite 会话后端 + RunCheckpoint 实现(T2-6):单文件、WAL、崩溃恢复、零额外依赖。

安装

pip install mainspring-session-sqlite

用法

from mainspring_session_sqlite import open_sqlite

store, checkpoint = open_sqlite(".mainspring/session.db")

await store.append("session-1", [message])   # 按 Message.id 幂等去重
history = await store.load("session-1")

runner = Runner(store=store, checkpoint=checkpoint)

append 靠唯一索引 (session_id, message_id) 去重;快照整包落库,进程被 kill 后可从最后 一次提交恢复。把 backend_factory 注入 mainspring.config.build_store,即可在 YAML 里用 session.backend: sqlite 选中它。

mainspring 工作区成员,与 core 同源。MIT。

Metadata

Release files for mainspring-session-sqlite 0.1.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 mainspring-session-sqlite 0.1.1
File Size Uploaded Provenance Actions
mainspring_session_sqlite-0.1.1.tar.gz 5.9 kB With provenance Details for mainspring_session_sqlite-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mainspring-session-sqlite 0.1.1
File Interpreter ABI Platform Actions
mainspring_session_sqlite-0.1.1-py3-none-any.whl Python 3 none any Details for mainspring_session_sqlite-0.1.1-py3-none-any.whl

Total release size: 12.9 kB

Release files / mainspring_session_sqlite-0.1.1.tar.gz

Download URL mainspring_session_sqlite-0.1.1.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b560d665dd1c0c71c83f49c57ebbf367ab8787b637ad3d5d7a4c672e5827c534
BLAKE2b-256 checksum
How to use checksums
d9d034105df0776a70484103e616474af3a2b43de7be3a648829e4b2900979a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 6, 2026.

Transparency log

Release files / mainspring_session_sqlite-0.1.1-py3-none-any.whl

Download URL mainspring_session_sqlite-0.1.1-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1d21d0e47686ff60907ec1f0e66b7388b7601cc8badfbd852ef3a66b23e06e18
BLAKE2b-256 checksum
How to use checksums
e5926b098c8e205735ee1fa660c5851fd2ae4c1fe867fb51f03f44eb09e4e6e5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Dec 6, 2026.

Transparency log

Security for mainspring-session-sqlite 0.1.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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mainspring_session_sqlite-0.1.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 Dec 6, 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