Skip to main content

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,与嵌入表单读写同一留言流。设置按钮只在服务器返回 can_manage=true 时显示。网关为普通成员设置 X-ChatComment-Role: reader,仅经服务端验证的 owner 使用 admin;管理接口另行验证权限。公开浏览器不能靠昵称或伪造角色 header 获得权限,因为缺少服务器 Bearer token。

Metadata

Release files for ChatComment 0.1.0

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

Source distribution (sdist)

Source distribution for ChatComment 0.1.0
File Size Uploaded Provenance
chatcomment-0.1.0.tar.gz 22.8 kB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ChatComment 0.1.0
File Interpreter ABI Platform
chatcomment-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 43.5 kB

Release files / chatcomment-0.1.0.tar.gz

Download URL chatcomment-0.1.0.tar.gz
Size 22.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7c7d55482e5e463e7fa6f2201122af19ad82570aa6074b6830ee9f49679ca4c8
BLAKE2b-256 checksum
How to use checksums
54d9beedbbbf6b1ce70f4d6eb0d02ca36f4ed520f53e9736af5b3acd742d8126
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 log

Release files / chatcomment-0.1.0-py3-none-any.whl

Download URL chatcomment-0.1.0-py3-none-any.whl
Size 20.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7edffc6d3dd0c536406938ea80de9ea41ecb8d2d60348c243e30f0ed985bbfc4
BLAKE2b-256 checksum
How to use checksums
c50ff09a378d61fd38cf9b334e1ed230ff31e5cf3118353c821bbb5504aba4ce
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 log

Security for ChatComment 0.1.0

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.

Select from 2 files

Attestation for chatcomment-0.1.0.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 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.

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