Skip to main content

Bitool - Rust + Python 混合架构工具集

Project description

Bitool

基于 Maturin 的 Rust + Python 混合架构工具集,将性能瓶颈和共性部分使用 Rust 实现,接口和逻辑部分使用 Python 实现。

特性

  • 高性能:核心计算和 I/O 操作使用 Rust 实现
  • 易用性:Python 提供简洁的 API 接口
  • 可扩展:插件系统支持功能扩展
  • 跨平台:支持 Windows、Linux、macOS

安装

pip install bitool

开发

快速开始(推荐)

# 安装开发环境(自动构建 Rust + Python 双包)
pymake ia

# 验证安装
pymake t

常用命令

# 构建所有包(Rust + Python)
pymake ba

# 代码格式化与检查
pymake lint

# 运行测试
pymake t

# 清理所有构建产物
pymake ca

# 查看完整帮助
pymake help

手动构建(可选)

# 构建 Rust 核心模块
cd bitool-core && maturin develop

# 构建 Python 主包
cd .. && pip install -e .

# 构建发布包
cd bitool-core && maturin build -r
cd .. && python -m build

📖 详细文档:PyMake 使用指南 | 双包构建指南

项目结构

bitool/
├── bitool-core/            # Rust 核心模块   ├── src/                # Rust 源代码      ├── core/           # 核心功能模块      ├── plugins/        # 插件系统核心      └── python/         # Python 绑定   ├── Cargo.toml          # Rust 依赖配置   └── pyproject.toml      # Maturin 构建配置
├── src/
│   ├── bitool/             # Python 主包 (src layout)      ├── apps/           # 应用程序 (alarmclock, pypack)      ├── cmd/            # 命令系统      ├── core/           # 核心业务逻辑 (config, logger, env)      ├── gui/            # GUI 组件和主题      ├── models/         # 数据模型      ├── skills/         # CLI 工具集      ├── utils/          # 工具模块 (executor, profiler, task)      ├── __init__.py     # 包初始化      ├── consts.py       # 常量定义      └── types.py        # 类型定义   └── tests/              # 测试代码       ├── apps/           # 应用测试       ├── cmd/            # 命令系统测试       ├── core/           # 核心模块测试       ├── skills/         # 技能工具测试       └── utils/          # 工具模块测试
├── docs/                   # 项目文档
├── pyproject.toml          # Python 包配置
└── README.md               # 项目说明

使用示例

from bitool import FileOps, TextProcessor

# 文件操作
file_ops = FileOps()
files = file_ops.scan_directory("/path/to/dir")

# 文本处理
processor = TextProcessor()
result = processor.regex_search(pattern, text)

许可证

MIT License

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

bitool-0.1.7.tar.gz (1.4 MB view details)

Uploaded Source

Built Distribution

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

bitool-0.1.7-py3-none-any.whl (496.5 kB view details)

Uploaded Python 3

File details

Details for the file bitool-0.1.7.tar.gz.

File metadata

  • Download URL: bitool-0.1.7.tar.gz
  • Upload date:
  • Size: 1.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.11 HTTPX/0.28.1

File hashes

Hashes for bitool-0.1.7.tar.gz
Algorithm Hash digest
SHA256 7c1ef48b360d1cf40340173ca9ba36b1533026e1ccf855243186b670f0c4c6af
MD5 43a896776ac39ec44dd2322761330f79
BLAKE2b-256 8e505387e384fa6c9089e67630260c4ddeabb7021de30cf62eee0d82c6848ea0

See more details on using hashes here.

File details

Details for the file bitool-0.1.7-py3-none-any.whl.

File metadata

  • Download URL: bitool-0.1.7-py3-none-any.whl
  • Upload date:
  • Size: 496.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Hatch/1.16.5 cpython/3.12.11 HTTPX/0.28.1

File hashes

Hashes for bitool-0.1.7-py3-none-any.whl
Algorithm Hash digest
SHA256 573a922397987cf330c55628212cfccfa20dc5f1041df197d385ab0e5edb7d2f
MD5 58fa0bb5b9fa9e7235a32370b5d93472
BLAKE2b-256 8f3bbe1826aa9d138eb157a01f8557d86954979baa5c69313451a23cd33e62d3

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