Gfruit
一个用于浏览器自动化和数据库管理的Python包。
简介
Gfruit是一个功能强大的Python库,提供了两个主要模块:
browser_use- 基于Selenium的浏览器自动化工具db_manager- 数据库管理工具
安装
从PyPI安装(推荐)
pip install Gfruit
从源码安装
git clone https://github.com/yourusername/Gfruit.git
cd Gfruit
pip install .
从构建的包安装
pip install dist/gfruit-0.1.0-py3-none-any.whl
使用方法
导入模块
from Gfruit.browser_use import SeleniumBase
from Gfruit.db_manager import DatabaseManager
SeleniumBase 使用示例
# 初始化SeleniumBase
browser = SeleniumBase(ads_id="your_ads_id")
# 初始化WebDriver
driver = browser.init_driver()
# 使用各种浏览器操作方法
browser.button_click("//button[@id='submit']", "点击提交按钮")
DatabaseManager 使用示例
# 初始化DatabaseManager
db = DatabaseManager(host="localhost", user="root", password="password", database="test")
# 使用上下文管理器自动处理连接
with db:
result = db.fetch_all("SELECT * FROM users")
print(result)
开发
构建包
# 安装构建工具
pip install build
# 清理旧的构建文件
rm -rf dist/ build/ *.egg-info src/*.egg-info
# 构建新包
python -m build
发布新版本
详细说明请参阅 RELEASE.md 文件。
依赖
- keyboard
- requests
- psutil
- selenium
- loguru
- web3
- webdriver-manager
- PyMySQL
许可证
MIT
Metadata
Release files for Gfruit 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 | Actions |
|---|---|---|---|---|
| gfruit-0.1.1.tar.gz | 16.1 kB | Without provenance | Details for gfruit-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gfruit-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for gfruit-0.1.1-py3-none-any.whl |
Total release size: 31.4 kB
Release files / gfruit-0.1.1.tar.gz
| Download URL | gfruit-0.1.1.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
20c71b7a2c39f61430b049156a0639b3c8a2969215e1fdfa1e74b9a98f9850e2
|
|
BLAKE2b-256 checksum How to use checksums |
b1984b85adb600c804b33f848ea07f9c56d026068d13330adebd8366109571f7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Release files / gfruit-0.1.1-py3-none-any.whl
| Download URL | gfruit-0.1.1-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
820ac76501dfcec107faa3bc0c4e50badc8ed4c2c8bebcadd07d067f6ad7a206
|
|
BLAKE2b-256 checksum How to use checksums |
9be5bc517d85b7521a6e0a2cc2ca9344c462ff781f19bd53055d95a14f69bf2b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.2
|
Security for Gfruit 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.
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.