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.2

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.2
File Size Uploaded Provenance Actions
mainspring_session_sqlite-0.1.2.tar.gz 5.9 kB With provenance Details for mainspring_session_sqlite-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 12.9 kB

Release files / mainspring_session_sqlite-0.1.2.tar.gz

Download URL mainspring_session_sqlite-0.1.2.tar.gz
Size 5.9 kB
Tags Source
SHA-256 checksum
How to use checksums
370fd2e34848229aba94ca2bc5c51f452779e03c7c5686d37e543f0b7c91e54e
BLAKE2b-256 checksum
How to use checksums
898d1cb39ae3b6050b2e963d322bfa0058a51e31d0aa6c105d495629dcf7ba1f
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.2-py3-none-any.whl

Download URL mainspring_session_sqlite-0.1.2-py3-none-any.whl
Size 7.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8389ae6e103b2d13372567afd391a458ac695931fc55fadeaefb91d5374114ed
BLAKE2b-256 checksum
How to use checksums
506d451f9958d203e7b161d89119811dc82f73baa90e77b9b6a2844e08b1ef32
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.2

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.2.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