Skip to main content

项目

  • python 3.12.12
  • fastmcp 2.14.2
  • pandas、polars
  • 单元测试用 unittest
  • 测试用例在 tests 文件夹下
  • 目的是为了解决,读取Excel 会返回整个表信息,导致token 爆炸的问题,而用数据库的形式,可以让LLM 逐步进行数据分析,避免token 爆炸的问题。

技术方案

  • 是用 uv 管理和打包,.venv 为虚拟环境目录
  • 用DB 的方式提供读取、分析 Excel
  • Sheet = Dbname
  • 表头就是字段
  • 行号 = id
  • 提供 pandas 和 polars 两种数据处理方式

文件夹

  • src
    • tools 每个工具单独一个文件夹

tools

  • get_sheet_list 获取所有sheet 列表、名称
  • select_count_sheet_rows 获取 sheet 的行数
  • select_sheet_rows_by_id 获取 sheet 的某一行数据
  • select_sheet_rows_by_title_where 根据多个表头的条件(可以完全匹配、模糊匹配、正则匹配、大于小于、区间、包含、不包含) 获取 sheet 的某行数据
  • group_by_sheet_title_get_count_and_values 对某个表头进行分组,统计内容、行数
  • search_row_in_sheet_by_keyword 在某个sheet 中搜索某个关键字
  • query_by_sql 使用 SQL 语句查询 sheet 数据,支持完整的 SQL 语法(SELECT、WHERE、GROUP BY、ORDER BY、HAVING、LIMIT 等),使用 polars SQLContext 实现

Metadata

Release files for uvx-excel-read-dbmod 0.2.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 uvx-excel-read-dbmod 0.2.1
File Size Uploaded Provenance
uvx_excel_read_dbmod-0.2.1.tar.gz 17.4 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for uvx-excel-read-dbmod 0.2.1
File Interpreter ABI Platform
uvx_excel_read_dbmod-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 41.9 kB

Release files / uvx_excel_read_dbmod-0.2.1.tar.gz

Download URL uvx_excel_read_dbmod-0.2.1.tar.gz
Size 17.4 kB
Tags Source
SHA-256 checksum
How to use checksums
69ca467cf73c69dc4404c600cab08b02367eedbfae15f2954c8e3eb0c1bf60ea
BLAKE2b-256 checksum
How to use checksums
44cbbe21354e95b68cff33f854192a874bacde55344545d0a601138d7a3ea8b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Release files / uvx_excel_read_dbmod-0.2.1-py3-none-any.whl

Download URL uvx_excel_read_dbmod-0.2.1-py3-none-any.whl
Size 24.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
91377adb19779ed13040654c473116e0e09dee90a01043b0518d001c3a9d7a8d
BLAKE2b-256 checksum
How to use checksums
6f76aa47601f6f3da160f9419a06cab7ce0e6a49869cee68c87d23d7a77e2d2f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.9

Security for uvx-excel-read-dbmod 0.2.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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files No provenance

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