Skip to main content

High-performance Python bindings for Rust crates (UUID, Chrono, and more)

Project description

🦀 Rusthonian

High-performance Python bindings for Rust crates

CI License

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.md for 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.md for 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

🧪 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:

  1. Fork the repo
  2. Create a feature branch
  3. Make your changes
  4. Run tests: ./test_all.sh
  5. Submit a PR

📮 Links


Built with PyO3 ❤️

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

Rusthonian-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl (519.3 kB view details)

Uploaded CPython 3.13manylinux: glibc 2.34+ x86-64

File details

Details for the file Rusthonian-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl.

File metadata

File hashes

Hashes for Rusthonian-0.2.0-cp313-cp313-manylinux_2_34_x86_64.whl
Algorithm Hash digest
SHA256 73963ff6d0da21299752b16aca742ed55b3ab5a870e91d32348f81017f963003
MD5 d4c969fb5a78ab1b7d9ca47d20213bff
BLAKE2b-256 4405b24e5a31d4e425b76c1fa8659af1974189de73cbd62e8b6ccae6544cf504

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