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 主包   ├── core/               # 核心业务逻辑   ├── cmd/                # 命令系统   ├── scripts/            # CLI 工具集   ├── utils/              # 工具模块   └── cli/                # 命令行入口
├── docs/                   # 项目文档
├── pyproject.toml          # Python 包配置
├── Makefile                # 构建脚本(可选)
└── build_all.py            # Python 构建脚本

使用示例

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.3.tar.gz (981.2 kB 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.3-py3-none-any.whl (105.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: bitool-0.1.3.tar.gz
  • Upload date:
  • Size: 981.2 kB
  • 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.3.tar.gz
Algorithm Hash digest
SHA256 961abcb9534e1b28c1d26223e0d21c44ed4d4cb39bd799b267ec9a6f6e5b8320
MD5 45a938e2d0ecb0de554b70d12b33d5e7
BLAKE2b-256 42abc679111e41542f3efb80598aad3dbff34333df1b6ade41b2cb559b86e1bd

See more details on using hashes here.

File details

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

File metadata

  • Download URL: bitool-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 105.8 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 c0c67c385e4522c78d5be645902fea24852a6ddfbe2c5e7253754db3beaaaeae
MD5 7aff15178198dc54ef23278111602939
BLAKE2b-256 2ebe6585fa62714a2977da5fe842f878a86c5e4ab0f9f33c55bb972cb7c56dbc

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