Skip to main content

po-docs-db

基于关键词匹配的文档知识库,使用 jieba 分词 + SQLite 倒排索引,提供中文/英文混合的关键词搜索。

安装

pip install po-docs-db

使用

from po_docs_db import PoDocsDB

docs = PoDocsDB(db_path="./data/docs.db", docs_dir="./docs")

# 写入文档
docs.write(
    type="前端",
    lang="vue",
    question="Font Awesome 在 Vue 中如何使用",
    doc_name="fontawesome-usage",
    content="# Font Awesome\n...",
)

# 查询
result = docs.query(type="前端", lang="vue", query="fontawesome 图标")
for item in result.results:
    print(f"{item.doc_path} | 匹配 {item.match_count} 个词: {item.matched_words}")

# 关闭
docs.close()

许可证

MIT

Metadata

Release files for po-docs-db 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 po-docs-db 0.1.0
File Size Uploaded
po_docs_db-0.1.0.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for po-docs-db 0.1.0
File Interpreter ABI Platform
po_docs_db-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 20.1 kB

Release files / po_docs_db-0.1.0.tar.gz

Download URL po_docs_db-0.1.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
a6ec1925562caf0568dbffc8d244fb0fe48a09f62d2413047a26ca272907187f
BLAKE2b-256 checksum
How to use checksums
3509ee198b841f01761a0d3f06fdd01eec927c4b1ed665bb892ccdfef1604871
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 13, 2026.

Transparency log

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

Download URL po_docs_db-0.1.0-py3-none-any.whl
Size 6.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1e26b06758364da5d8df99b874ee8ee3c7356c7f21781c828b8ac021e9aa87f1
BLAKE2b-256 checksum
How to use checksums
121a7f23c07edda963c228b1de7e1b52c9b7ac4dd2c6d54faef77128308d91b0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Jul 13, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

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