Skip to main content

用于读取 InfluxDB 数据库并进行趋势极值分析的 Python 包

Project description

#trendgjj/趋势图分析

作者:郭金基 Author:JinJi Guo 这是一个用于读取 InfluxDB 数据库并进行趋势极值分析的 Python 包。 This is a Python package used to read the InfluxDB database and perform trend extremum analysis.

#功能特点 / Features

  • 连接 InfluxDB 数据库,查询时间序列数据
  • 对数据进行趋势分析,自动识别极值点
  • 基于 tkinter 的图形界面,方便交互操作
  • 支持配置管理(通过 ConfigManager)
  • 依赖常用的数据科学库:numpy, pandas, matplotlib, scipy, statsmodels

#安装 / Installation 使用 pip 直接安装: pip install trendgjj

安装后,所有依赖(如 influxdb-client、matplotlib 等)将自动安装。

#快速开始 / Quick Start

  1. 启动图形界面 在终端中直接运行以下命令即可: trendgjj

或者通过 Python 模块方式运行: python -m trendgjj

  1. 导入使用 你可以在自己的 Python 脚本中导入该包的功能: python from trendgjj import ConfigManager, InputDialog# 创建配置管理器实例config_mgr = ConfigManager()# 启动输入对话框InputDialog(config_mgr)

#使用说明 / Usage Guide 配置文件 程序使用 configparser 管理配置。首次运行时,会自动生成默认配置文件config.ini(路径通常位于用户目录或当前工作目录,具体取决于实现)。你可以手动编辑配置文件,设置 InfluxDB 连接参数(如主机、端口、数据库、测量名称等)。 主界面 运行后会出现输入对话框,你需要填写:

  • InfluxDB 连接信息
  • 查询时间范围
  • 其他分析参数(如峰值检测阈值等) 点击“确定”后,程序将从 InfluxDB 获取数据,进行趋势分析并显示结果图表。 命令行参数(可选) 如果你实现了命令行参数解析,可以在 README 中说明,例如: bash trendgjj --config myconfig.ini

#依赖项 / Dependencies 项目运行时需要以下 Python 库(已在 setup.py 中声明,安装时会自动处理):

  • numpy>=1.18.0
  • pandas>=1.0.0
  • matplotlib>=3.0.0
  • scipy>=1.4.0
  • statsmodels>=0.12.0
  • influxdb-client>=1.30.0 此外,图形界面基于 tkinter(Python 标准库,无需额外安装)。

#许可证 / License 本项目使用 MIT 许可证,详情请参阅 LICENSE 文件。

#贡献 / Contributing 欢迎提交 Issue 或 Pull Request 来改进项目。如果你发现任何问题或有新功能建议,请通过 [GitHub Issues](如果有)或直接联系作者。

#作者联系方式 / Contact

#版本历史 / Release History

  • 0.1.0 (2026-03-16) 初始版本发布,支持 InfluxDB 数据读取和趋势极值分析。
  • 0.1.1 (2026-03-16) 修改调用函数。
  • 0.1.2 (2026-03-16) 增加命令行直接调用。

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

trendgjj-0.1.2.tar.gz (24.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

trendgjj-0.1.2-py3-none-any.whl (24.2 kB view details)

Uploaded Python 3

File details

Details for the file trendgjj-0.1.2.tar.gz.

File metadata

  • Download URL: trendgjj-0.1.2.tar.gz
  • Upload date:
  • Size: 24.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for trendgjj-0.1.2.tar.gz
Algorithm Hash digest
SHA256 324e4c1b7213b7bd1375448ccd24aa374d6def595211207affde8c9b9aa9457e
MD5 90cfa83caa9eb983c53aef457bc0032a
BLAKE2b-256 d58c420d3e6db726fe8f8decaeac5cf2bfba55932fbd9d015a2fea4841a3ef74

See more details on using hashes here.

File details

Details for the file trendgjj-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: trendgjj-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 24.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for trendgjj-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b885b8cdf1fcad2520ffec76c734f2fdf6b5dc38aded7343c4a27acf1bfe50b
MD5 0aba9b7c731c7afe38bf706715f6c48f
BLAKE2b-256 5089bbe94c4dc830e45dd29ab4575870b55e97ce4a2d1336195a29b98b4829f6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page