ChatComment
Python 服务、SQLite 数据和一个无依赖的 JavaScript 留言组件。支持多站点、逐页隔离、匿名开关、昵称/邮箱/网址必填设置、审核与软删除。邮箱只在管理界面出现。默认私有站点由可信网关保护;可显式注册公开站点。
python -m pip install .
chatcomment --version
chatcomment --tree
chatcomment site register personal-blog --origin https://blog.example.com --page /post/one --public
chatcomment serve --token-file ~/.chatarch/chatcomment/admin-token
--token-file 必须指向仅部署者可读的现有文件(建议随机 32 字节以上);命令不生成或打印密钥。默认数据库 ~/.chatarch/chatcomment/comments.sqlite3,监听 127.0.0.1:10196。公网接入必须使用 HTTPS 反向代理;私有站点的 API 要由网关验证登录后附加 Bearer token,不能把该 token 交给浏览器。管理入口也必须经这种登录网关,或使用支持 Bearer token 的管理客户端。
<div id="comments"></div>
<script src="https://comments.example.com/widget.js" defer
data-chatcomment data-target="#comments"
data-api="https://comments.example.com" data-site="personal-blog"
data-page="/post/one"></script>
组件自动读取设置并只显示允许的字段;必填校验由服务器执行。默认不记住访客信息、不加载第三方头像、不渲染留言 HTML。公开模式的匿名留言不代表拥有可信实名;关闭匿名时要求可信网关提供已验证的作者身份。
API、网关接入、备份与恢复见 docs/api.md、docs/deployment.md。本包不自动开放防火墙或注册 DNS,也不包含云服务凭据。
独立留言板为 /board?site=personal-blog&page=%2Fpost%2Fone,与嵌入表单读写同一留言流。组件只提供一个齿轮入口:已登录 owner 在邮箱栏填写匹配邮箱后,服务器返回显示提示;昵称不参与判断,邮箱不下发到 JS 配置。齿轮指向邮箱/密码验证页;网关须实现 /api/admin/reauth 并在校验现有账号后授予短时管理权限。公开站点没有该提示。
网关为普通成员设置 X-ChatComment-Role: reader,仅经服务端验证的 owner 使用 admin;管理接口另行验证权限。公开浏览器不能靠昵称、邮箱或伪造角色 header 获得权限,因为缺少服务器 Bearer token。服务器可为受信 owner 请求附加 X-ChatComment-Admin-Email,只用于入口提示。完整验证合约见部署文档。
Metadata
Release files for ChatComment 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| chatcomment-0.1.1.tar.gz | 24.6 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chatcomment-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 47.4 kB
Release files / chatcomment-0.1.1.tar.gz
| Download URL | chatcomment-0.1.1.tar.gz |
|---|---|
| Size | 24.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
27631ebfeb4c811969a45d1d398b5a381fb8112264bcb23cc4c0ef3f9466df85
|
|
BLAKE2b-256 checksum How to use checksums |
bb9e1364bee122c0c8f554a667ca7a1259af0140c5c6cec1821345eaba354222
|
| 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 Oct 20, 2026.
Transparency logRelease files / chatcomment-0.1.1-py3-none-any.whl
| Download URL | chatcomment-0.1.1-py3-none-any.whl |
|---|---|
| Size | 22.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fd2bb78df521d08cd20b4f23d924452eb271dcf2eb2c5aa80c7dac4a5588b48
|
|
BLAKE2b-256 checksum How to use checksums |
10eb3e044dd57d207d6ff97b6a00c48f8b7ceb9b5bd3e9fb5f8d29bc1f0b9a0b
|
| 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 Oct 20, 2026.
Transparency logSecurity for ChatComment 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for chatcomment-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 Oct 20, 2026.
Transparency logA 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.