High-performance Python bindings for Rust crates (UUID, Chrono, and more)
Project description
🦀 Rusthonian
High-performance Python bindings for Rust crates
Rusthonian is an umbrella project that provides Python bindings for high-quality Rust crates through PyO3.
🚀 Quick Start
Install from PyPI (Easiest)
pip install Rusthonian
Or Build from Source
git clone https://github.com/Rusthonian/Rusthonian.git
cd Rusthonian
pip install maturin
maturin develop --release
Use It
from Rusthonian import uuid, chrono
print(uuid.uuid4())
now = chrono.DateTime.now()
print(now.to_rfc3339())
📦 Included Modules
UUID
Complete Python bindings for Rust's uuid crate.
- All UUID versions (v1-v8)
- 9.6+ million UUIDs/second performance
- See
uuid/README.mdfor full documentation
Example:
from Rusthonian import uuid
u = uuid.uuid4()
print(u)
Chrono
Complete Python bindings for Rust's chrono crate.
- DateTime with timezone support (UTC, Local, FixedOffset)
- Naive types (NaiveDateTime, NaiveDate, NaiveTime)
- Duration arithmetic and conversions
- 10-50x faster than Python's datetime
- RFC3339 and RFC2822 parsing/formatting
- See
chrono/README.mdfor full documentation
Example:
from Rusthonian import chrono
now = chrono.DateTime.now()
tomorrow = now + chrono.Duration.days(1)
print(tomorrow.format("%Y-%m-%d %H:%M:%S"))
📥 Installation
pip install Rusthonian
That's it! No need to install Rust or build anything. Pre-built wheels are available for:
- Linux (x86_64, aarch64)
- macOS (Intel, Apple Silicon)
- Windows (x64)
🛠️ Building
Requirements
- Python 3.9+
- Rust (latest stable)
- Maturin (
pip install maturin)
Build Commands
# Development build (editable install)
maturin develop --release
# Production build (wheel)
maturin build --release
# Quick test
python -c "from Rusthonian import uuid; print(uuid.uuid4())"
Python 3.13+
export PYO3_USE_ABI3_FORWARD_COMPATIBILITY=1
maturin develop --release
📖 Documentation
- Quick Start: See
QUICKSTART.md - UUID Module: See
uuid/README.md - Chrono Module: See
chrono/README.md - Examples: Check module-specific example directories
🧪 Testing
# Run all tests
./test_all.sh
# Or test individual modules
python uuid/test_comprehensive.py
python chrono/examples/chrono_example.py
🏗️ Project Structure
Rusthonian/
├── src/ # Main umbrella project
│ └── lib.rs
├── uuid/ # UUID module
│ ├── src/
│ ├── examples/
│ └── README.md
├── chrono/ # Chrono module
│ ├── src/
│ ├── examples/
│ └── README.md
├── Rusthonian/ # Python package wrapper
│ └── __init__.py
├── Cargo.toml # Rust config
└── pyproject.toml # Python packaging
📄 License
Dual-licensed under MIT OR Apache-2.0
🤝 Contributing
Contributions welcome! Please:
- Fork the repo
- Create a feature branch
- Make your changes
- Run tests:
./test_all.sh - Submit a PR
📮 Links
Built with PyO3 ❤️
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file Rusthonian-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: Rusthonian-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 519.3 kB
- Tags: CPython 3.13, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
73963ff6d0da21299752b16aca742ed55b3ab5a870e91d32348f81017f963003
|
|
| MD5 |
d4c969fb5a78ab1b7d9ca47d20213bff
|
|
| BLAKE2b-256 |
4405b24e5a31d4e425b76c1fa8659af1974189de73cbd62e8b6ccae6544cf504
|