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.5.tar.gz
(11.5 kB
view hashes)
Built Distributions
Close
Hashes for rython_calc-0.4.5-cp312-none-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0176b5c451ea7044ea68984498142eee29bd44896d133f3f2faa95781ee7839 |
|
MD5 | 8aaabd7592179ca17387f19c96f128f2 |
|
BLAKE2b-256 | c21da501a45e1e8933e27b400ffafa97896226c2f1751f4230c0637e08f4c52f |
Close
Hashes for rython_calc-0.4.5-cp312-none-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d66792c8ca4d294ddfbf6e3f3215ce261ffdd158a3827fa82962049b1399d766 |
|
MD5 | 98d0567c5424487be0f25298c0d66d59 |
|
BLAKE2b-256 | a6efa609e045fca18abc8ddb67cea0f3509a550bfd8ab91c9581e47982073d43 |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b156e8131933a00f5d53317fb9f12117d05c64559250300559f4216e7e7b112 |
|
MD5 | d788a6d421553b51e46f14fd8dc04e0a |
|
BLAKE2b-256 | 0ec3b4dd319bd373cadb3cc168b6b0c53f2af6ff1eca37f6e08bcb93f13de270 |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2141f7fb4321e94a537ce2df314e3232edd65164ffd2d6748225b525dbc58c57 |
|
MD5 | 6cc833fe52c1c20bd920eaef8fa16c7e |
|
BLAKE2b-256 | 6e6ece2f342fe61e830c0c690e38b32feba890c5e38834015db350ba222f15da |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96980dc46a94f670336b366642c7ed536cd11e3cfa2b0064763346c42ad483d5 |
|
MD5 | f7f5797cc9a2b561ae2042b04a16eb70 |
|
BLAKE2b-256 | eccd696f95c773830b3e47b45edac87239a96b8dc8e140bd5c505a8f85f5a83a |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 00a2694a057adaf2baf443a67f0ebba0c2355d087142e6dfb13917f87a658e89 |
|
MD5 | 9d097457ac0066973154846dcf7c836f |
|
BLAKE2b-256 | bd4880487e0b51066fcb69bb2388d2a0154f850c5d4d55a4390bc272bd82cfb1 |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b58d280c6a8287b8fa56e0464d8c6be613019962d4a07cb1599dbf93114dde2 |
|
MD5 | 7f18c97fc201330c8cd05f37a3cceb5a |
|
BLAKE2b-256 | d07f701ce4b4724d79d81ef5ceec03cee50a504ba1162e214ea21bfc4b8f92f6 |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65219535c1699282a7bb0395eed0b710e463ecc89c5f506913181ac31c8587c5 |
|
MD5 | 356f1e996384ca08d0b408624ea5938e |
|
BLAKE2b-256 | 9d73997956ce13e3ca6a5d12723da38bd19fbfaa5b77effc15f8addc8565569a |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30335358134cc11bc3ed1fc1c81ccc9c9422224edc07693caecb6240f247b2b8 |
|
MD5 | 3348a821a8492f5c128675aaaed5f4c8 |
|
BLAKE2b-256 | 64e83d6df880b7e600b769dcac761bb4976d5ed40e032454fc6a62b773baec3c |
Close
Hashes for rython_calc-0.4.5-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1abf69985949ebb0d55923c8ae84c1a30ee571a3c253312fbd4040b858d1fa2 |
|
MD5 | 355f4652a65e86bcfc7d22895c5cdfec |
|
BLAKE2b-256 | dd671a2844f2f5fd6c0b5236309bd398e4cb8950e9ec9e205328461feb70a777 |