Small project developed by me to learn PyO3 library.
Project description
Rython
To build local package use
maturin develop --release
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.5.2.tar.gz
(20.4 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.5.2-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 324bee563c282adc93aebc65d14cac865845caa1bc8d606262a86c7cf5293f58 |
|
MD5 | 3f650368ce888a92e1a7109a594de8ec |
|
BLAKE2b-256 | 888dcb3168505846f867d2621e95542e69534d47e69e8b2009a87777c8ba38bf |
Close
Hashes for rython_calc-0.5.2-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a652a788f8993ae8775ed3bfd98e681a2be7b37064886f3332c82db719010a4a |
|
MD5 | 42112ad441cf91a2cd7e46e7ac3f2d51 |
|
BLAKE2b-256 | a5996d25a426d480e9e32add98d14c7feae6b43c22fd5fa91e4a9efa52c5908f |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 417aa8418d1255cde4fdf4b0ed338339f243303d1582d1ff14eec6b30f58d861 |
|
MD5 | 5f687eaca96cb18274df70d48a02af1e |
|
BLAKE2b-256 | 285642baca77e956be7dd018ed99d6f1f596fc837e29a927d90ce08f839e2382 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4834f2d9526be30f1f90fe31818dd65b0064d3f376e3a364a84dc4d7ff5a438a |
|
MD5 | 4b47b925996617d0c619580fc08915b7 |
|
BLAKE2b-256 | 0208405246960389fa87fa4b66635e222b169ca9e924e3a3f9011ab34d5d45d5 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3f60877dbe8bce5708c3bf92484ebf08d006237f82842aa358b6a4ecdd985a33 |
|
MD5 | ebe58e1331f823ff02f6d2fa36f7d0dd |
|
BLAKE2b-256 | ba2753c2a1de0673f6643c27cd44e1da229305098ff6ec61cdffcbac79fe8b20 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54db8af7898092bb0eaadf7b355853da3d2a66263d17a1110fa04b09a68305ee |
|
MD5 | 5d57b38b4a164121f85f5c33554228af |
|
BLAKE2b-256 | 8d6e05900088f762b92c607e3be963711a743ed23c101dcbd601803e6133dd48 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3e681dc55119e232a69044600730e24400469e663175bd284c5c689c55d26007 |
|
MD5 | 3ac7293f0cadc540c6b138c76f03c303 |
|
BLAKE2b-256 | cd0f10ed7007b3c582d94bc70181675ec275d50f8b147fb74760f053ee420f56 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 062f70690cd34a7dcd8ae406c49584242c48fdb1cf990e9a085d5b3fdbc227ea |
|
MD5 | f7cb16c6496443ca0f4eb615f16228c5 |
|
BLAKE2b-256 | d4f9c9b5ef80b36356b2c5ad5131331efddc72c86dac9fbb7d99eba03196a03c |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 67ca0e70bd1524ecf32926fa606ab8f432f992d85f80ec989a9d21162299e572 |
|
MD5 | b39767e89cd39fa95ad5012e44204448 |
|
BLAKE2b-256 | e2838f0d97a262aae6a26857adf647c168a4785e939322b74227e45db427b252 |
Close
Hashes for rython_calc-0.5.2-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec88c4887b000781aa17a87c00070c1bb85ce357ea68e7fc158bb6105f671330 |
|
MD5 | ea60048effcae32450ad18d44c2a49a2 |
|
BLAKE2b-256 | e635ab1bb9b4761a439c671a57f150ddc45dae8d9098f8c0d05f2dceb8bffe3b |