Small project developed by me to learn PyO3 library.
Project description
Rython
Use text_signature to create python type
/// Formats the sum of two numbers as string.
#[pyfunction(text_signature = "(a: int, b: int) -> str")]
fn sum_as_string(a: usize, b: usize) -> PyResult<String> {
Ok((a + b).to_string())
}
Add .pyi file using mypy
Keep in mind that is only works for #[pyfunction]
. Macros like #[pyclass]
and #[pymethods]
are still unsupported.
For autocompletion .pyi in bash type:
stubgen -p rython.calc -o python
It will produce calc.pyi with:
def sum_as_string(a: int, b: int) -> str: ...
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 Distribution
rython_calc-0.4.7.tar.gz
(11.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.7-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08ea8600366374d473a24c2982ef3af9c9f3635086bcd41cf634ebc3ae94f76d |
|
MD5 | e44c26585bcde414e5c46c6c1f50d8a2 |
|
BLAKE2b-256 | 90989549dd1640ff9ea2f260948365cd2e3a8f50e3500f7c9ddc28f014a630b5 |
Close
Hashes for rython_calc-0.4.7-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9e35bd83193f9f1049294634ba4cddca6c2369991d29fbeb7d4a0ed68a887612 |
|
MD5 | edeb6b890c02281e7d6b190f84f64a16 |
|
BLAKE2b-256 | dbb22716f8753c2c3a75b8083c1e71708a6f142572183dc68a541fc3f89939d2 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2ac2863bc49a03b273bb7a8a0be534b18607c5ae20e76922ecb957a166b8165e |
|
MD5 | 058732af6044a2f46a662e2762235dc3 |
|
BLAKE2b-256 | b6508d9b843392a784e57b7ad73bc885b27047174aefdfcbcead177ae2fb1e97 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8d88ea07fd3440c7d88951f6516e98c25df9cd6a2ab9ff01c83b17b71473b43d |
|
MD5 | 97c43eecda052635302f57a1c42f3761 |
|
BLAKE2b-256 | 5b251192a8a0cda92e1777ec664759a7e484f1bf2fb38f4ed9855b2be15a411a |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c1ee98cb0416e6d0178a0c4a53f0e7189f87d123af1a248418763a8953700c86 |
|
MD5 | 81343a93ad21501c3ca7698e403a7afa |
|
BLAKE2b-256 | 7c251050c05bd31cddff65f670ed3a4fa345798c6b1a4cdc086646d7c7015269 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43bc61f9be5ab19d8c3fbcec73fd3580f5e4f6c7d70864796419a702fcb7daa6 |
|
MD5 | 4d66c20192209b108a48c9d406964ea1 |
|
BLAKE2b-256 | 89cd5b7c2d5abf830f1e72bc0e379df7be5ab1ac3c16098e4fed1af324943161 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff6f2e16d80c3ccb3c7dd35a7b30415eb0e22e292252b58763d0491bfad8d07b |
|
MD5 | 759a89d3cdbccb18a48bd57a9c7fb986 |
|
BLAKE2b-256 | f303734447c21abedbaf11c0ac7d5898c2092d34eb0730144ae93f26779a61d9 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 97eca4dad9cb2b53965386e754e2fcdbd0df394b1603456dfb88cbeb7781fcab |
|
MD5 | a316edd4832cf3c6763cb52bfb237aa3 |
|
BLAKE2b-256 | 04b1f169e0851ae3308fc8f2ed703e4c130955ee5d5aa30fc1fecc39ad4bb655 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 678b1a6edc6c560071196982b5e4ee9378b7f91653645e5aab430ebce99039c0 |
|
MD5 | ce94018e2991b258b7673d6ff62e486a |
|
BLAKE2b-256 | fb85c6255e7e7fae6789fd43b7630079814846f96fcc602a69e747bdb21c06c2 |
Close
Hashes for rython_calc-0.4.7-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b99788157bfa9798e588d8d89a9a168702e0028f6c03d9c048b44714be61c386 |
|
MD5 | a8664d1af7642191d8f8b6f9921c6c82 |
|
BLAKE2b-256 | cf3ceaed033497fcf9c92283938500d308fd26fb41115a3252bd8fddc1f33c4b |