| Crates.io | pyo3_special_method_derive_macro |
| lib.rs | pyo3_special_method_derive_macro |
| version | 0.4.3 |
| created_at | 2024-07-19 19:56:15.000902+00 |
| updated_at | 2025-04-10 13:55:45.782205+00 |
| description | Automatically derive Python dunder methods for your Rust code |
| homepage | |
| repository | https://github.com/EricLBuehler/pyo3-special-method-derive |
| max_upload_size | |
| id | 1309034 |
| size | 67,812 |
This crate enables you to automatically derive Python dunder methods for your Rust crate using PyO3.
__str____repr____dir____getattr____dict__#[skip(...)] attributepub#[pyclass]
#[derive(Dir, Str, Repr)]
struct Person {
pub name: String,
occupation: String,
#[pyo3_smd(skip)]
pub phone_num: String,
}
To use pyo3-special-method-derive, you should enable the multiple-pymethods feature on PyO3:
pyo3 = { version = "0.22", features = ["multiple-pymethods"] }